------------------------------------------------------------------------------
      name:  <unnamed>
       log:  C:\Users\Tabi\Dropbox\ingroup derogation and white response\Repli
> cation\log.log
  log type:  text
 opened on:  28 Oct 2021, 05:12:14

. 
. *** Study 1 clean up.
. 
. cd ".\Study1"
C:\Users\Tabi\Dropbox\ingroup derogation and white response\Replication\Study1

. do "study1_cleanup.do"

. use "study1a_data.dta", clear

. 
. gen treat=1 if Q21==1 |Q21==2
(1,206 missing values generated)

. replace treat=2 if Q19==11|Q19==2
(86 real changes made)

. replace treat=3 if Q18==1|Q18==2
(92 real changes made)

. replace treat=4 if Q16==1|Q16==2
(91 real changes made)

. tab treat

      treat |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         89       24.86       24.86
          2 |         86       24.02       48.88
          3 |         92       25.70       74.58
          4 |         91       25.42      100.00
------------+-----------------------------------
      Total |        358      100.00

. 
. 
. drop if (Q20 ==1|Q20==2)
(92 observations deleted)

. drop if (Q17 ==1|Q17==2)
(93 observations deleted)

. 
. ***DVs
. 
. gen vote=(4-Q27)/3
(495 missing values generated)

. tab Q27 vote

  If the election |
 were held today, |
 how likely would |
   you be to vote |                    vote
  for this Senate |         0   .3333333   .6666667          1 |     Total
------------------+--------------------------------------------+----------
      Very likely |         0          0          0         24 |        24 
  Somewhat likely |         0          0        232          0 |       232 
Somewhat unlikely |         0        176          0          0 |       176 
    Very unlikely |       183          0          0          0 |       183 
------------------+--------------------------------------------+----------
            Total |       183        176        232         24 |       615 

. label var vote "Vote for candidate"

. 
. 
. gen agree=1 if Q25==1
(1,019 missing values generated)

. replace agree=.6667 if Q25==2
(292 real changes made)

. replace agree=.3333 if Q25==4
(164 real changes made)

. replace agree=0 if Q25==5
(88 real changes made)

. tab Q25 agree

  How strongly do |
     you agree or |
disagree with the |
statement made by |                    agree
  this Senate can |         0      .3333      .6667          1 |     Total
------------------+--------------------------------------------+----------
   Strongly agree |         0          0          0         91 |        91 
   Somewhat agree |         0          0        292          0 |       292 
Somewhat disagree |         0        164          0          0 |       164 
Strongly disagree |        88          0          0          0 |        88 
------------------+--------------------------------------------+----------
            Total |        88        164        292         91 |       635 

. label var agree "Agree with candidate"

. 
. gen truthful=(4-Q28_1)/3
(507 missing values generated)

. tab Q28_1 truthful

    How would you |
         rate the |
candidate on each |
 of the following |
 characteristics? |                  truthful
            For e |         0   .3333333   .6666667          1 |     Total
------------------+--------------------------------------------+----------
   Strongly agree |         0          0          0         62 |        62 
   Somewhat agree |         0          0        304          0 |       304 
Somewhat disagree |         0        175          0          0 |       175 
Strongly disagree |        62          0          0          0 |        62 
------------------+--------------------------------------------+----------
            Total |        62        175        304         62 |       603 

. label var truthful "Candidate is truthful"

. 
. gen expert=(4-Q28_2)/3
(507 missing values generated)

. tab Q28_2 expert

    How would you |
         rate the |
candidate on each |
 of the following |
 characteristics? |                   expert
            For e |         0   .3333333   .6666667          1 |     Total
------------------+--------------------------------------------+----------
   Strongly agree |         0          0          0         32 |        32 
   Somewhat agree |         0          0        217          0 |       217 
Somewhat disagree |         0        232          0          0 |       232 
Strongly disagree |       122          0          0          0 |       122 
------------------+--------------------------------------------+----------
            Total |       122        232        217         32 |       603 

. label var expert "candidate is expert"

. 
. gen knowledgeable=(4-Q28_6)/3
(507 missing values generated)

. tab Q28_6 knowledgeable

    How would you |
         rate the |
candidate on each |
 of the following |
 characteristics? |                knowledgeable
            For e |         0   .3333333   .6666667          1 |     Total
------------------+--------------------------------------------+----------
   Strongly agree |         0          0          0         51 |        51 
   Somewhat agree |         0          0        313          0 |       313 
Somewhat disagree |         0        149          0          0 |       149 
Strongly disagree |        90          0          0          0 |        90 
------------------+--------------------------------------------+----------
            Total |        90        149        313         51 |       603 

. label var knowledgeable  "candidate is knowledgeable"

. 
. gen trustworthy= (4-Q28_3)/3
(507 missing values generated)

. tab Q28_3 trustworthy

    How would you |
         rate the |
candidate on each |
 of the following |
 characteristics? |                 trustworthy
            For e |         0   .3333333   .6666667          1 |     Total
------------------+--------------------------------------------+----------
   Strongly agree |         0          0          0         41 |        41 
   Somewhat agree |         0          0        266          0 |       266 
Somewhat disagree |         0        215          0          0 |       215 
Strongly disagree |        81          0          0          0 |        81 
------------------+--------------------------------------------+----------
            Total |        81        215        266         41 |       603 

. label var trustworthy "candidate is trustworthy"

. 
. gen representative=(4-Q28_8)/3
(507 missing values generated)

. tab Q28_8 representative

    How would you |
         rate the |
candidate on each |
 of the following |
 characteristics? |               representative
            For e |         0   .3333333   .6666667          1 |     Total
------------------+--------------------------------------------+----------
   Strongly agree |         0          0          0         50 |        50 
   Somewhat agree |         0          0        254          0 |       254 
Somewhat disagree |         0        172          0          0 |       172 
Strongly disagree |       127          0          0          0 |       127 
------------------+--------------------------------------------+----------
            Total |       127        172        254         50 |       603 

. label var representative "represents views of people like me"

. 
. gen shares=(4-Q28_9)/3
(507 missing values generated)

. tab Q28_9 shares

    How would you |
         rate the |
candidate on each |
 of the following |
 characteristics? |                   shares
            For e |         0   .3333333   .6666667          1 |     Total
------------------+--------------------------------------------+----------
   Strongly agree |         0          0          0         44 |        44 
   Somewhat agree |         0          0        250          0 |       250 
Somewhat disagree |         0        170          0          0 |       170 
Strongly disagree |       139          0          0          0 |       139 
------------------+--------------------------------------------+----------
            Total |       139        170        250         44 |       603 

. label var shares "shares my way of thinking"

. 
. gen honest=(4-Q28_10)/3
(507 missing values generated)

. tab Q28_10 honest

    How would you |
         rate the |
candidate on each |
 of the following |
 characteristics? |                   honest
            For e |         0   .3333333   .6666667          1 |     Total
------------------+--------------------------------------------+----------
   Strongly agree |         0          0          0         62 |        62 
   Somewhat agree |         0          0        306          0 |       306 
Somewhat disagree |         0        175          0          0 |       175 
Strongly disagree |        60          0          0          0 |        60 
------------------+--------------------------------------------+----------
            Total |        60        175        306         62 |       603 

. label var honest "candidate is honest"

. 
. gen pandering=(Q28_4-1)/3
(507 missing values generated)

. tab Q28_4 pandering

    How would you |
         rate the |
candidate on each |
 of the following |
 characteristics? |                  pandering
            For e |         0   .3333333   .6666667          1 |     Total
------------------+--------------------------------------------+----------
   Strongly agree |        72          0          0          0 |        72 
   Somewhat agree |         0        209          0          0 |       209 
Somewhat disagree |         0          0        265          0 |       265 
Strongly disagree |         0          0          0         57 |        57 
------------------+--------------------------------------------+----------
            Total |        72        209        265         57 |       603 

. label var pandering "candidate is pandering"

. 
. gen opportunistic=(Q28_5-1)/3
(507 missing values generated)

. tab Q28_5 opportunistic

    How would you |
         rate the |
candidate on each |
 of the following |
 characteristics? |                opportunistic
            For e |         0   .3333333   .6666667          1 |     Total
------------------+--------------------------------------------+----------
   Strongly agree |       106          0          0          0 |       106 
   Somewhat agree |         0        302          0          0 |       302 
Somewhat disagree |         0          0        161          0 |       161 
Strongly disagree |         0          0          0         34 |        34 
------------------+--------------------------------------------+----------
            Total |       106        302        161         34 |       603 

. label var opportunistic "candidate is opportunistic"

. 
. gen nocare=(Q28_7-1)/3
(507 missing values generated)

. tab Q28_7 nocare

    How would you |
         rate the |
candidate on each |
 of the following |
 characteristics? |                   nocare
            For e |         0   .3333333   .6666667          1 |     Total
------------------+--------------------------------------------+----------
   Strongly agree |        54          0          0          0 |        54 
   Somewhat agree |         0        170          0          0 |       170 
Somewhat disagree |         0          0        295          0 |       295 
Strongly disagree |         0          0          0         84 |        84 
------------------+--------------------------------------------+----------
            Total |        54        170        295         84 |       603 

. label var nocare "Candidate doesn't care about people like me"

. 
. **Two factors in unrestricted factor analysis, restrict to two
. **positive and negative load on separate dimensions
. factor truthful expert knowledgeable trustworthy representative shares hones
> t pandering opportunistic nocare, factors (2)
(obs=603)

Factor analysis/correlation                      Number of obs    =        603
    Method: principal factors                    Retained factors =          2
    Rotation: (unrotated)                        Number of params =         19

    --------------------------------------------------------------------------
         Factor  |   Eigenvalue   Difference        Proportion   Cumulative
    -------------+------------------------------------------------------------
        Factor1  |      4.94053      4.21751            0.9054       0.9054
        Factor2  |      0.72303      0.40920            0.1325       1.0379
        Factor3  |      0.31382      0.21618            0.0575       1.0954
        Factor4  |      0.09764      0.12710            0.0179       1.1133
        Factor5  |     -0.02946      0.01442           -0.0054       1.1079
        Factor6  |     -0.04388      0.05212           -0.0080       1.0998
        Factor7  |     -0.09600      0.00893           -0.0176       1.0822
        Factor8  |     -0.10493      0.00507           -0.0192       1.0630
        Factor9  |     -0.11000      0.12378           -0.0202       1.0428
       Factor10  |     -0.23377            .           -0.0428       1.0000
    --------------------------------------------------------------------------
    LR test: independent vs. saturated:  chi2(45) = 3593.63 Prob>chi2 = 0.0000

Factor loadings (pattern matrix) and unique variances

    -------------------------------------------------
        Variable |  Factor1   Factor2 |   Uniqueness 
    -------------+--------------------+--------------
        truthful |   0.8093   -0.0969 |      0.3357  
          expert |   0.7656   -0.1090 |      0.4019  
    knowledgea~e |   0.8070   -0.0682 |      0.3441  
     trustworthy |   0.8400   -0.0998 |      0.2845  
    representa~e |   0.8304   -0.0249 |      0.3099  
          shares |   0.8334   -0.0452 |      0.3034  
          honest |   0.7383   -0.1094 |      0.4429  
       pandering |   0.3850    0.5559 |      0.5427  
    opportunis~c |   0.1566    0.5274 |      0.6974  
          nocare |   0.4907    0.2922 |      0.6739  
    -------------------------------------------------

. rotate

Factor analysis/correlation                      Number of obs    =        603
    Method: principal factors                    Retained factors =          2
    Rotation: orthogonal varimax (Kaiser off)    Number of params =         19

    --------------------------------------------------------------------------
         Factor  |     Variance   Difference        Proportion   Cumulative
    -------------+------------------------------------------------------------
        Factor1  |      4.68520      3.70684            0.8586       0.8586
        Factor2  |      0.97836            .            0.1793       1.0379
    --------------------------------------------------------------------------
    LR test: independent vs. saturated:  chi2(45) = 3593.63 Prob>chi2 = 0.0000

Rotated factor loadings (pattern matrix) and unique variances

    -------------------------------------------------
        Variable |  Factor1   Factor2 |   Uniqueness 
    -------------+--------------------+--------------
        truthful |   0.8082    0.1052 |      0.3357  
          expert |   0.7689    0.0827 |      0.4019  
    knowledgea~e |   0.7990    0.1325 |      0.3441  
     trustworthy |   0.8387    0.1099 |      0.2845  
    representa~e |   0.8110    0.1802 |      0.3099  
          shares |   0.8189    0.1612 |      0.3034  
          honest |   0.7425    0.0756 |      0.4429  
       pandering |   0.2364    0.6336 |      0.5427  
    opportunis~c |   0.0220    0.5497 |      0.6974  
          nocare |   0.4037    0.4039 |      0.6739  
    -------------------------------------------------

Factor rotation matrix

    --------------------------------
                 | Factor1  Factor2 
    -------------+------------------
         Factor1 |  0.9693   0.2461 
         Factor2 | -0.2461   0.9693 
    --------------------------------

. 
. **Index alpha=0.934
. egen competence=rowmean(truthful expert knowledgeable trustworthy representa
> tive shares honest)
(507 missing values generated)

. label var competence "competence index"

. tab competence

 competence |
      index |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |         30        4.98        4.98
    .047619 |          8        1.33        6.30
   .0952381 |         10        1.66        7.96
   .1428571 |         24        3.98       11.94
   .1904762 |         24        3.98       15.92
   .2380952 |         23        3.81       19.73
   .2857143 |         19        3.15       22.89
   .3333333 |         45        7.46       30.35
   .3809524 |         37        6.14       36.48
   .4285714 |         37        6.14       42.62
   .4761905 |         26        4.31       46.93
   .5238096 |         35        5.80       52.74
   .5714286 |         39        6.47       59.20
   .6190476 |         55        9.12       68.33
   .6666667 |        105       17.41       85.74
   .7142857 |         29        4.81       90.55
   .7619048 |         15        2.49       93.03
   .8095238 |         12        1.99       95.02
   .8571429 |          6        1.00       96.02
   .9047619 |          9        1.49       97.51
    .952381 |          6        1.00       98.51
          1 |          9        1.49      100.00
------------+-----------------------------------
      Total |        603      100.00

. alpha truthful expert knowledgeable trustworthy representative shares honest

Test scale = mean(unstandardized items)

Average interitem covariance:     .0517529
Number of items in the scale:            7
Scale reliability coefficient:      0.9283

. 
. 
. 
. ****Racial resentment index****
. 
. gen symrace1=(Q42_1-1)/3
(515 missing values generated)

. tab Q42_1 symrace1

  For each of the |
        following |
      statements, |
  please indicate |
 how strongly you |                  symrace1
         agree or |         0   .3333333   .6666667          1 |     Total
------------------+--------------------------------------------+----------
Strongly disagree |       100          0          0          0 |       100 
Somewhat disagree |         0        193          0          0 |       193 
            Agree |         0          0        202          0 |       202 
   Strongly Agree |         0          0          0        100 |       100 
------------------+--------------------------------------------+----------
            Total |       100        193        202        100 |       595 

. 
. gen symrace2=(4-Q42_2)/3
(515 missing values generated)

. tab Q42_2 symrace2

  For each of the |
        following |
      statements, |
  please indicate |
 how strongly you |                  symrace2
         agree or |         0   .3333333   .6666667          1 |     Total
------------------+--------------------------------------------+----------
Strongly disagree |         0          0          0        148 |       148 
Somewhat disagree |         0          0        160          0 |       160 
            Agree |         0        192          0          0 |       192 
   Strongly Agree |        95          0          0          0 |        95 
------------------+--------------------------------------------+----------
            Total |        95        192        160        148 |       595 

. 
. gen symrace3=(4-Q42_3)/3
(515 missing values generated)

. tab Q42_3 symrace3

  For each of the |
        following |
      statements, |
  please indicate |
 how strongly you |                  symrace3
         agree or |         0   .3333333   .6666667          1 |     Total
------------------+--------------------------------------------+----------
Strongly disagree |         0          0          0        116 |       116 
Somewhat disagree |         0          0        212          0 |       212 
            Agree |         0        206          0          0 |       206 
   Strongly Agree |        61          0          0          0 |        61 
------------------+--------------------------------------------+----------
            Total |        61        206        212        116 |       595 

. 
. gen symrace4=(Q42_4-1)/3
(515 missing values generated)

. tab Q42_4 symrace4

  For each of the |
        following |
      statements, |
  please indicate |
 how strongly you |                  symrace4
         agree or |         0   .3333333   .6666667          1 |     Total
------------------+--------------------------------------------+----------
Strongly disagree |       159          0          0          0 |       159 
Somewhat disagree |         0        234          0          0 |       234 
            Agree |         0          0        149          0 |       149 
   Strongly Agree |         0          0          0         53 |        53 
------------------+--------------------------------------------+----------
            Total |       159        234        149         53 |       595 

. 
. **alpha=0.849
. alpha symrace1 symrace2 symrace3 symrace4

Test scale = mean(unstandardized items)

Average interitem covariance:     .0603327
Number of items in the scale:            4
Scale reliability coefficient:      0.8541

. 
. egen symrace=rowmean (symrace1 symrace2 symrace3 symrace4)
(515 missing values generated)

. label var symrace "racial resentment index"

. 
. ***demographics
. 
. gen income=1 if Q61==2
(843 missing values generated)

. replace income=0 if Q61==1
(320 real changes made)

. tab Q61 income

  Does your total |
 household income |
       fall below |
 $50,000 dollars, |
 or is it $50,000 |        income
               or |         0          1 |     Total
------------------+----------------------+----------
    Below $50,000 |       320          0 |       320 
$50,000 or higher |         0        267 |       267 
------------------+----------------------+----------
            Total |       320        267 |       587 

. label var income "income"

. 
. gen ideology=(Q69-1)/4
(524 missing values generated)

. tab Q69 ideology

  Generally speaking, |
      do you consider |             ideology
    yourself to be... |         0        .25         .5 |     Total
----------------------+---------------------------------+----------
         Very liberal |        76          0          0 |        76 
     Somewhat liberal |         0        184          0 |       184 
             Moderate |         0          0        171 |       171 
Somewhat conservative |         0          0          0 |       115 
    Very conservative |         0          0          0 |        40 
----------------------+---------------------------------+----------
                Total |        76        184        171 |       586 


  Generally speaking, |
      do you consider |       ideology
    yourself to be... |       .75          1 |     Total
----------------------+----------------------+----------
         Very liberal |         0          0 |        76 
     Somewhat liberal |         0          0 |       184 
             Moderate |         0          0 |       171 
Somewhat conservative |       115          0 |       115 
    Very conservative |         0         40 |        40 
----------------------+----------------------+----------
                Total |       115         40 |       586 

. label var ideology "ideology-conservative"

. 
. 
. gen age1829=1 if Q3==1
(657 missing values generated)

. replace age1829=0 if Q3>1
(657 real changes made)

. label var age1829 "age 18-29"

. 
. gen age3044=1 if Q3==2
(699 missing values generated)

. replace age3044=0 if Q3==1|Q3==3|Q3==4
(666 real changes made)

. label var age3044 "Age 30-44"

. 
. gen age4564=1 if Q3==3
(919 missing values generated)

. replace age4564=0 if Q3==1|Q3==2|Q3==4
(886 real changes made)

. label var age4564 "Age 45-64"

. 
. gen age65p=1 if Q3==4
(1,088 missing values generated)

. replace age65p=0 if Q3<4
(1,055 real changes made)

. label var age65p "Age 65+"

. 
. gen female=1 if Q5==1
(573 missing values generated)

. replace female=0 if Q5==2
(306 real changes made)

. label var female "female"

. 
. 
. gen pid7 = 0 if Q68==3
(1,020 missing values generated)

. replace pid7 = -3 if Q67==1
(113 real changes made)

. replace pid7 = -2 if Q67==2
(84 real changes made)

. replace pid7 = -1 if Q68==1
(107 real changes made)

. replace pid7 = 1 if Q68==2
(52 real changes made)

. replace pid7 = 2 if Q66==2
(74 real changes made)

. replace pid7 = 3 if Q66==1
(66 real changes made)

. 
. gen pid7R = pid7/3
(524 missing values generated)

. 
. gen college = 1 if Q57>=3
(70 missing values generated)

. *gen income = Q63 + 5
. *replace income = Q62 if income==.
. 
. gen FT_blacks = Q35/100
(513 missing values generated)

. gen discrim_blacks = (4-Q40_2)/3
(513 missing values generated)

. gen inf_black = 2-Q43
(515 missing values generated)

. 
. gen perceived_Dem = 2-Q55
(520 missing values generated)

. 
. 
. save "study1a_cleaned.dta", replace
file study1a_cleaned.dta saved

. 
. use "study1b_data.dta", clear

. 
. ***CLEAN VARIABLES***
. 
. gen treatment=1 if Q22==1|Q22==2
(288 missing values generated)

. replace treatment=2 if Q20==1|Q20==2
(55 real changes made)

. replace treatment=3 if Q21==1|Q21==3
(0 real changes made)

. replace treatment=4 if Q19==1|Q19==2
(58 real changes made)

. replace treatment=5 if Q17==1|Q17==2
(58 real changes made)

. replace treatment=6 if Q18==1|Q18==2
(60 real changes made)

. tab treatment

  treatment |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         58       20.07       20.07
          2 |         55       19.03       39.10
          4 |         58       20.07       59.17
          5 |         58       20.07       79.24
          6 |         60       20.76      100.00
------------+-----------------------------------
      Total |        289      100.00

. 
. 
. drop if treatment ==3|treatment==6
(60 observations deleted)

. 
. gen treat = treatment
(57 missing values generated)

. recode treat 1=1 2=2 4=3 5=4
(treat: 116 changes made)

. 
. ***DVs
. 
. gen vote=(4-Q27)/3
(12 missing values generated)

. tab Q27 vote

  If the election |
 were held today, |
 how likely would |
   you be to vote |                    vote
  for this Senate |         0   .3333333   .6666667          1 |     Total
------------------+--------------------------------------------+----------
      Very likely |         0          0          0         20 |        20 
  Somewhat likely |         0          0        115          0 |       115 
Somewhat unlikely |         0         68          0          0 |        68 
    Very unlikely |        71          0          0          0 |        71 
------------------+--------------------------------------------+----------
            Total |        71         68        115         20 |       274 

. label var vote "Vote for candidate"

. 
. 
. gen agree=1 if Q25==1
(235 missing values generated)

. replace agree=.6666 if Q25==2
(120 real changes made)

. replace agree=.3333 if Q25==4
(57 real changes made)

. replace agree=0 if Q25==5
(58 real changes made)

. tab Q25 agree

  How strongly do |
     you agree or |
disagree with the |
statement made by |                    agree
  this Senate can |         0      .3333      .6666          1 |     Total
------------------+--------------------------------------------+----------
   Strongly agree |         0          0          0         51 |        51 
   Somewhat agree |         0          0        120          0 |       120 
Somewhat disagree |         0         57          0          0 |        57 
Strongly disagree |        58          0          0          0 |        58 
------------------+--------------------------------------------+----------
            Total |        58         57        120         51 |       286 

. label var agree "Agree with candidate"

. 
. gen truthful=(4-Q28_1)/3
(13 missing values generated)

. tab Q28_1 truthful

    How would you |
         rate the |
candidate on each |
 of the following |
 characteristics? |                  truthful
            For e |         0   .3333333   .6666667          1 |     Total
------------------+--------------------------------------------+----------
   Strongly agree |         0          0          0         42 |        42 
   Somewhat agree |         0          0        133          0 |       133 
Somewhat disagree |         0         72          0          0 |        72 
Strongly disagree |        26          0          0          0 |        26 
------------------+--------------------------------------------+----------
            Total |        26         72        133         42 |       273 

. label var truthful "Candidate is truthful"

. 
. gen expert=(4-Q28_2)/3
(13 missing values generated)

. tab Q28_2 expert

    How would you |
         rate the |
candidate on each |
 of the following |
 characteristics? |                   expert
            For e |         0   .3333333   .6666667          1 |     Total
------------------+--------------------------------------------+----------
   Strongly agree |         0          0          0         19 |        19 
   Somewhat agree |         0          0        105          0 |       105 
Somewhat disagree |         0         92          0          0 |        92 
Strongly disagree |        57          0          0          0 |        57 
------------------+--------------------------------------------+----------
            Total |        57         92        105         19 |       273 

. label var expert "candidate is expert"

. 
. gen knowledgeable=(4-Q28_6)/3
(13 missing values generated)

. tab Q28_6 knowledgeable

    How would you |
         rate the |
candidate on each |
 of the following |
 characteristics? |                knowledgeable
            For e |         0   .3333333   .6666667          1 |     Total
------------------+--------------------------------------------+----------
   Strongly agree |         0          0          0         46 |        46 
   Somewhat agree |         0          0        121          0 |       121 
Somewhat disagree |         0         72          0          0 |        72 
Strongly disagree |        34          0          0          0 |        34 
------------------+--------------------------------------------+----------
            Total |        34         72        121         46 |       273 

. label var knowledgeable  "candidate is knowledgeable"

. 
. gen trustworthy= (4-Q28_3)/3
(13 missing values generated)

. tab Q28_3 trustworthy

    How would you |
         rate the |
candidate on each |
 of the following |
 characteristics? |                 trustworthy
            For e |         0   .3333333   .6666667          1 |     Total
------------------+--------------------------------------------+----------
   Strongly agree |         0          0          0         32 |        32 
   Somewhat agree |         0          0        126          0 |       126 
Somewhat disagree |         0         89          0          0 |        89 
Strongly disagree |        26          0          0          0 |        26 
------------------+--------------------------------------------+----------
            Total |        26         89        126         32 |       273 

. label var trustworthy "candidate is trustworthy"

. 
. gen representative=(4-Q28_8)/3
(13 missing values generated)

. tab Q28_8 representative

    How would you |
         rate the |
candidate on each |
 of the following |
 characteristics? |               representative
            For e |         0   .3333333   .6666667          1 |     Total
------------------+--------------------------------------------+----------
   Strongly agree |         0          0          0         37 |        37 
   Somewhat agree |         0          0        110          0 |       110 
Somewhat disagree |         0         72          0          0 |        72 
Strongly disagree |        54          0          0          0 |        54 
------------------+--------------------------------------------+----------
            Total |        54         72        110         37 |       273 

. label var representative "represents views of people like me"

. 
. gen shares=(4-Q28_9)/3
(13 missing values generated)

. tab Q28_9 shares

    How would you |
         rate the |
candidate on each |
 of the following |
 characteristics? |                   shares
            For e |         0   .3333333   .6666667          1 |     Total
------------------+--------------------------------------------+----------
   Strongly agree |         0          0          0         34 |        34 
   Somewhat agree |         0          0        116          0 |       116 
Somewhat disagree |         0         60          0          0 |        60 
Strongly disagree |        63          0          0          0 |        63 
------------------+--------------------------------------------+----------
            Total |        63         60        116         34 |       273 

. label var shares "shares my way of thinking"

. 
. gen honest=(4-Q28_10)/3
(13 missing values generated)

. tab Q28_10 honest

    How would you |
         rate the |
candidate on each |
 of the following |
 characteristics? |                   honest
            For e |         0   .3333333   .6666667          1 |     Total
------------------+--------------------------------------------+----------
   Strongly agree |         0          0          0         46 |        46 
   Somewhat agree |         0          0        127          0 |       127 
Somewhat disagree |         0         78          0          0 |        78 
Strongly disagree |        22          0          0          0 |        22 
------------------+--------------------------------------------+----------
            Total |        22         78        127         46 |       273 

. label var honest "candidate is honest"

. 
. gen pandering=(Q28_4-1)/3
(13 missing values generated)

. tab Q28_4 pandering

    How would you |
         rate the |
candidate on each |
 of the following |
 characteristics? |                  pandering
            For e |         0   .3333333   .6666667          1 |     Total
------------------+--------------------------------------------+----------
   Strongly agree |        29          0          0          0 |        29 
   Somewhat agree |         0         97          0          0 |        97 
Somewhat disagree |         0          0        112          0 |       112 
Strongly disagree |         0          0          0         35 |        35 
------------------+--------------------------------------------+----------
            Total |        29         97        112         35 |       273 

. label var pandering "candidate is pandering"

. 
. gen opportunistic=(Q28_5-1)/3
(13 missing values generated)

. tab Q28_5 opportunistic

    How would you |
         rate the |
candidate on each |
 of the following |
 characteristics? |                opportunistic
            For e |         0   .3333333   .6666667          1 |     Total
------------------+--------------------------------------------+----------
   Strongly agree |        43          0          0          0 |        43 
   Somewhat agree |         0        132          0          0 |       132 
Somewhat disagree |         0          0         80          0 |        80 
Strongly disagree |         0          0          0         18 |        18 
------------------+--------------------------------------------+----------
            Total |        43        132         80         18 |       273 

. label var opportunistic "candidate is opportunistic"

. 
. gen nocare=(Q28_7-1)/3
(13 missing values generated)

. tab Q28_7 nocare

    How would you |
         rate the |
candidate on each |
 of the following |
 characteristics? |                   nocare
            For e |         0   .3333333   .6666667          1 |     Total
------------------+--------------------------------------------+----------
   Strongly agree |        21          0          0          0 |        21 
   Somewhat agree |         0         64          0          0 |        64 
Somewhat disagree |         0          0        141          0 |       141 
Strongly disagree |         0          0          0         47 |        47 
------------------+--------------------------------------------+----------
            Total |        21         64        141         47 |       273 

. label var nocare "Candidate doesn't care about people like me"

. 
. **Two factors in unrestricted factor analysis, restrict to two
. **positive and negative load on separate dimensions
. factor truthful expert knowledgeable trustworthy representative shares hones
> t pandering opportunistic nocare, factors (2)
(obs=273)

Factor analysis/correlation                      Number of obs    =        273
    Method: principal factors                    Retained factors =          2
    Rotation: (unrotated)                        Number of params =         19

    --------------------------------------------------------------------------
         Factor  |   Eigenvalue   Difference        Proportion   Cumulative
    -------------+------------------------------------------------------------
        Factor1  |      5.31829      4.62211            0.8977       0.8977
        Factor2  |      0.69618      0.35326            0.1175       1.0152
        Factor3  |      0.34292      0.24755            0.0579       1.0730
        Factor4  |      0.09537      0.04337            0.0161       1.0891
        Factor5  |      0.05200      0.11976            0.0088       1.0979
        Factor6  |     -0.06776      0.01209           -0.0114       1.0865
        Factor7  |     -0.07985      0.00697           -0.0135       1.0730
        Factor8  |     -0.08682      0.02146           -0.0147       1.0584
        Factor9  |     -0.10828      0.12916           -0.0183       1.0401
       Factor10  |     -0.23744            .           -0.0401       1.0000
    --------------------------------------------------------------------------
    LR test: independent vs. saturated:  chi2(45) = 1904.90 Prob>chi2 = 0.0000

Factor loadings (pattern matrix) and unique variances

    -------------------------------------------------
        Variable |  Factor1   Factor2 |   Uniqueness 
    -------------+--------------------+--------------
        truthful |   0.8259    0.0058 |      0.3179  
          expert |   0.7684   -0.1833 |      0.3759  
    knowledgea~e |   0.8443   -0.0552 |      0.2841  
     trustworthy |   0.8311   -0.0455 |      0.3071  
    representa~e |   0.8906   -0.0779 |      0.2008  
          shares |   0.8715   -0.0884 |      0.2327  
          honest |   0.8104    0.0280 |      0.3425  
       pandering |   0.3951    0.5539 |      0.5372  
    opportunis~c |   0.1438    0.5734 |      0.6505  
          nocare |   0.5060    0.0848 |      0.7368  
    -------------------------------------------------

. rotate

Factor analysis/correlation                      Number of obs    =        273
    Method: principal factors                    Retained factors =          2
    Rotation: orthogonal varimax (Kaiser off)    Number of params =         19

    --------------------------------------------------------------------------
         Factor  |     Variance   Difference        Proportion   Cumulative
    -------------+------------------------------------------------------------
        Factor1  |      5.12733      4.24019            0.8654       0.8654
        Factor2  |      0.88714            .            0.1497       1.0152
    --------------------------------------------------------------------------
    LR test: independent vs. saturated:  chi2(45) = 1904.90 Prob>chi2 = 0.0000

Rotated factor loadings (pattern matrix) and unique variances

    -------------------------------------------------
        Variable |  Factor1   Factor2 |   Uniqueness 
    -------------+--------------------+--------------
        truthful |   0.8074    0.1735 |      0.3179  
          expert |   0.7897   -0.0233 |      0.3759  
    knowledgea~e |   0.8379    0.1176 |      0.2841  
     trustworthy |   0.8231    0.1243 |      0.3071  
    representa~e |   0.8878    0.1047 |      0.2008  
          shares |   0.8712    0.0906 |      0.2327  
          honest |   0.7878    0.1922 |      0.3425  
       pandering |   0.2742    0.6226 |      0.5372  
    opportunis~c |   0.0243    0.5907 |      0.6505  
          nocare |   0.4782    0.1859 |      0.7368  
    -------------------------------------------------

Factor rotation matrix

    --------------------------------
                 | Factor1  Factor2 
    -------------+------------------
         Factor1 |  0.9791   0.2033 
         Factor2 | -0.2033   0.9791 
    --------------------------------

. 
. **Index alpha=0.934
. egen competence=rowmean(truthful expert knowledgeable trustworthy representa
> tive shares honest)
(13 missing values generated)

. label var competence "competence index"

. tab competence

 competence |
      index |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |         12        4.40        4.40
    .047619 |          4        1.47        5.86
   .0952381 |          6        2.20        8.06
   .1428571 |          9        3.30       11.36
   .1904762 |          5        1.83       13.19
   .2380952 |         13        4.76       17.95
   .2857143 |          9        3.30       21.25
   .3333333 |         21        7.69       28.94
   .3809524 |         15        5.49       34.43
   .4285714 |         10        3.66       38.10
   .4761905 |         11        4.03       42.12
   .5238096 |         15        5.49       47.62
   .5714286 |         19        6.96       54.58
   .6190476 |         19        6.96       61.54
   .6666667 |         43       15.75       77.29
   .7142857 |         18        6.59       83.88
   .7619048 |         10        3.66       87.55
   .8095238 |          3        1.10       88.64
   .8571429 |          7        2.56       91.21
   .9047619 |          6        2.20       93.41
    .952381 |         11        4.03       97.44
          1 |          7        2.56      100.00
------------+-----------------------------------
      Total |        273      100.00

. alpha truthful expert knowledgeable trustworthy representative shares honest

Test scale = mean(unstandardized items)

Average interitem covariance:     .0613542
Number of items in the scale:            7
Scale reliability coefficient:      0.9414

. 
. 
. ****Racial resentment index****
. 
. gen symrace1=(Q44_1-1)/3
(15 missing values generated)

. tab Q44_1 symrace1

  For each of the |
        following |
      statements, |
  please indicate |
 how strongly you |                  symrace1
         agree or |         0   .3333333   .6666667          1 |     Total
------------------+--------------------------------------------+----------
Strongly disagree |        48          0          0          0 |        48 
Somewhat disagree |         0         80          0          0 |        80 
            Agree |         0          0         95          0 |        95 
   Strongly Agree |         0          0          0         48 |        48 
------------------+--------------------------------------------+----------
            Total |        48         80         95         48 |       271 

. 
. gen symrace2=(4-Q44_2)/3
(15 missing values generated)

. tab Q44_2 symrace2

  For each of the |
        following |
      statements, |
  please indicate |
 how strongly you |                  symrace2
         agree or |         0   .3333333   .6666667          1 |     Total
------------------+--------------------------------------------+----------
Strongly disagree |         0          0          0         67 |        67 
Somewhat disagree |         0          0         80          0 |        80 
            Agree |         0         68          0          0 |        68 
   Strongly Agree |        56          0          0          0 |        56 
------------------+--------------------------------------------+----------
            Total |        56         68         80         67 |       271 

. 
. gen symrace3=(4-Q44_3)/3
(15 missing values generated)

. tab Q44_3 symrace3

  For each of the |
        following |
      statements, |
  please indicate |
 how strongly you |                  symrace3
         agree or |         0   .3333333   .6666667          1 |     Total
------------------+--------------------------------------------+----------
Strongly disagree |         0          0          0         56 |        56 
Somewhat disagree |         0          0         97          0 |        97 
            Agree |         0         81          0          0 |        81 
   Strongly Agree |        37          0          0          0 |        37 
------------------+--------------------------------------------+----------
            Total |        37         81         97         56 |       271 

. 
. gen symrace4=(Q44_4-1)/3
(15 missing values generated)

. tab Q44_4 symrace4

  For each of the |
        following |
      statements, |
  please indicate |
 how strongly you |                  symrace4
         agree or |         0   .3333333   .6666667          1 |     Total
------------------+--------------------------------------------+----------
Strongly disagree |        72          0          0          0 |        72 
Somewhat disagree |         0         91          0          0 |        91 
            Agree |         0          0         77          0 |        77 
   Strongly Agree |         0          0          0         31 |        31 
------------------+--------------------------------------------+----------
            Total |        72         91         77         31 |       271 

. 
. **alpha=0.87
. alpha symrace1 symrace2 symrace3 symrace4

Test scale = mean(unstandardized items)

Average interitem covariance:     .0684256
Number of items in the scale:            4
Scale reliability coefficient:      0.8660

. 
. egen symrace=rowmean (symrace1 symrace2 symrace3 symrace4)
(15 missing values generated)

. label var symrace "racial resentment index"

. 
. ***demographics
. 
. gen income=1 if Q59==2
(152 missing values generated)

. replace income=0 if Q59==1
(131 real changes made)

. tab Q59 income

  Does your total |
 household income |
       fall below |
 $50,000 dollars, |
 or is it $50,000 |        income
               or |         0          1 |     Total
------------------+----------------------+----------
    Below $50,000 |       131          0 |       131 
$50,000 or higher |         0        134 |       134 
------------------+----------------------+----------
            Total |       131        134 |       265 

. label var income "income"

. 
. gen ideology=(Q67-1)/4
(21 missing values generated)

. tab Q67 ideology

  Generally speaking, |
      do you consider |             ideology
    yourself to be... |         0        .25         .5 |     Total
----------------------+---------------------------------+----------
         Very liberal |        48          0          0 |        48 
     Somewhat liberal |         0         77          0 |        77 
             Moderate |         0          0         60 |        60 
Somewhat conservative |         0          0          0 |        58 
    Very conservative |         0          0          0 |        22 
----------------------+---------------------------------+----------
                Total |        48         77         60 |       265 


  Generally speaking, |
      do you consider |       ideology
    yourself to be... |       .75          1 |     Total
----------------------+----------------------+----------
         Very liberal |         0          0 |        48 
     Somewhat liberal |         0          0 |        77 
             Moderate |         0          0 |        60 
Somewhat conservative |        58          0 |        58 
    Very conservative |         0         22 |        22 
----------------------+----------------------+----------
                Total |        58         22 |       265 

. label var ideology "ideology-conservative"

. 
. 
. gen age1829=1 if Q3==1
(181 missing values generated)

. replace age1829=0 if Q3>1
(181 real changes made)

. label var age1829 "age 18-29"

. 
. gen age3044=1 if Q3==2
(189 missing values generated)

. replace age3044=0 if Q3==1|Q3==3|Q3==4
(189 real changes made)

. label var age3044 "Age 30-44"

. 
. gen age4564=1 if Q3==3
(216 missing values generated)

. replace age4564=0 if Q3==1|Q3==2|Q3==4
(216 real changes made)

. label var age4564 "Age 45-64"

. 
. gen age65p=1 if Q3==4
(272 missing values generated)

. replace age65p=0 if Q3<4
(272 real changes made)

. label var age65p "Age 65+"

. 
. 
. gen female = 2-Q5

. gen college = 1 if Q55>=3
(33 missing values generated)

. replace college = 0 if Q55 <3
(33 real changes made)

. gen age = 2015-Q56
(21 missing values generated)

. 
. gen FT_blacks = Q38/100
(15 missing values generated)

. gen discrim_blacks = (4-Q42_2)/3
(15 missing values generated)

. gen inf_black = 2-Q45
(16 missing values generated)

. 
. gen pid7 = 0 if Q66==3
(259 missing values generated)

. replace pid7 = -3 if Q65==1
(57 real changes made)

. replace pid7 = -2 if Q65==2
(51 real changes made)

. replace pid7 = -1 if Q66==1
(31 real changes made)

. replace pid7 = 1 if Q66==2
(21 real changes made)

. replace pid7 = 2 if Q64==2
(38 real changes made)

. replace pid7 = 3 if Q64==1
(40 real changes made)

. 
. gen pid7R = pid7/3
(21 missing values generated)

. 
. gen perceived_Dem = 2-Q53
(20 missing values generated)

. 
. append using "study1a_cleaned.dta"
(label Q67 already defined)
(label Q66 already defined)
(label Q65 already defined)
(label Q64 already defined)
(label Q63 already defined)
(label Q62 already defined)
(label Q61 already defined)
(label Q60 already defined)
(label Q59 already defined)
(label Q57 already defined)
(label Q55 already defined)
(label Q42_2 already defined)
(label Q28_10 already defined)
(label Q28_9 already defined)
(label Q28_8 already defined)
(label Q28_7 already defined)
(label Q28_6 already defined)
(label Q28_5 already defined)
(label Q28_4 already defined)
(label Q28_3 already defined)
(label Q28_2 already defined)
(label Q28_1 already defined)
(label Q27 already defined)
(label Q25 already defined)
(label Q22 already defined)
(label Q21 already defined)
(label Q20 already defined)
(label Q19 already defined)
(label Q18 already defined)
(label Q17 already defined)
(label Q5 already defined)
(label Q4 already defined)
(label Q3 already defined)
(label Q2 already defined)
(label Q1 already defined)

. 
. 
. 
. ***Additional traits ***
. drop honest shares expert

. gen truth = (4-Q28_1)/3
(520 missing values generated)

. gen expert = (4-Q28_2)/3
(520 missing values generated)

. gen trust = (4-Q28_3)/3
(520 missing values generated)

. gen pander = (4-Q28_4)/3
(520 missing values generated)

. gen opportun = (4-Q28_5)/3
(520 missing values generated)

. gen know = (4-Q28_6)/3
(520 missing values generated)

. gen care = (4-Q28_7)/3
(520 missing values generated)

. gen represent = (4-Q28_8)/3
(520 missing values generated)

. gen shares = (4-Q28_9)/3
(520 missing values generated)

. gen honest = (4-Q28_10)/3
(520 missing values generated)

. 
. 
. *gen treatDRR = treatDerog * symrace
. *reg agree i.treat symrace treatBRR treatDRR
. 
. alpha vote agree, item

Test scale = mean(unstandardized items)

Average interitem covariance:     .0676523
Number of items in the scale:            2
Scale reliability coefficient:      0.8344

. gen index = (vote + agree)/2
(507 missing values generated)

. 
. alpha vote agree truthful trustworthy honest, i

Test scale = mean(unstandardized items)

                                                            average
                             item-test     item-rest       interitem
Item         |  Obs  Sign   correlation   correlation     covariance      alph
> a
-------------+----------------------------------------------------------------
> -
vote         |  889    +       0.8217        0.7025        .0486017      0.862
> 0
agree        |  921    +       0.8030        0.6624        .0496161      0.872
> 5
truthful     |  876    +       0.8515        0.7642        .0490836      0.848
> 2
trustworthy  |  876    +       0.8595        0.7770         .048798      0.845
> 5
honest       |  876    +       0.8057        0.6976        .0516579      0.863
> 1
-------------+----------------------------------------------------------------
> -
Test scale   |                                             .0495519      0.883
> 3
------------------------------------------------------------------------------
> -

. gen indexA = (vote+agree+truthful+trustworthy+honest)/5
(520 missing values generated)

. 
. *alpha truth expert trust pandering opportun know care represent shares hone
> st, i g(indexChar)
. alpha truth trust honest, i gen(indexChar)

Test scale = mean(unstandardized items)

                                                            average
                             item-test     item-rest       interitem
Item         |  Obs  Sign   correlation   correlation     covariance      alph
> a
-------------+----------------------------------------------------------------
> -
truth        |  876    +       0.9169        0.8079        .0514325      0.822
> 8
trust        |  876    +       0.8975        0.7689        .0555525      0.857
> 0
honest       |  876    +       0.9015        0.7769        .0547239      0.850
> 1
-------------+----------------------------------------------------------------
> -
Test scale   |                                              .053903      0.890
> 0
------------------------------------------------------------------------------
> -

. alpha pander care opportun represent shares, i 

Test scale = mean(unstandardized items)

                                                            average
                             item-test     item-rest       interitem
Item         |  Obs  Sign   correlation   correlation     covariance      alph
> a
-------------+----------------------------------------------------------------
> -
pander       |  876    -       0.6847        0.4882        .0299947      0.688
> 3
care         |  876    -       0.6822        0.4874        .0301733      0.688
> 7
opportun     |  876    -       0.4956        0.2564        .0386342      0.765
> 6
represent    |  876    +       0.7979        0.6306        .0236682      0.627
> 8
shares       |  876    +       0.7900        0.6154        .0239852      0.634
> 3
-------------+----------------------------------------------------------------
> -
Test scale   |                                             .0292911      0.732
> 3
------------------------------------------------------------------------------
> -

. gen indexApp2 = ((1-pander) + (1-care) + (1-opportun) + represent + shares)/
> 5
(520 missing values generated)

. alpha pander opportun, i gen(indexApp)

Test scale = mean(unstandardized items)

Average interitem covariance:     .0339146
Number of items in the scale:            2
Scale reliability coefficient:      0.6311

. gen ageR = (age -20)/55
(1,131 missing values generated)

. gen incomeR = (income-1)/9
(544 missing values generated)

. 
. label var age "Age"

. label var ageR "Age"

. label var female "Female"

. label var college "College Educated"

. label var incomeR "Family Income"

. label var ideology "Ideology"

. label var symrace "Racial Resentment"

. label var treat "Treatment"

. 
. label var index "Approval"

. label var indexChar "Character"

. label var indexApp2 "Appropriate"

. 
. label define treat 1 "White Neutral" 2 "White Derogator" 3 "Black Neutral" 4
>  "Black Derogator"

. label values treat treat

. 
. 
. save "study1_cleaned.dta", replace
file study1_cleaned.dta saved

. 
. *Balance and Demographics Tables
. set matsize 2000

. cd "./tables" 
C:\Users\Tabi\Dropbox\ingroup derogation and white response\Replication\Study1
> \tables

. 
. estpost summarize age female college incomeR pid7R ideology symrace  

             |  e(count)   e(sum_w)    e(mean)     e(Var)      e(sd) 
-------------+-------------------------------------------------------
         age |       265        265   36.71321    175.819   13.25967 
      female |      1129       1129   .6448184   .2292307   .4787804 
     college |      1326       1326   .9751131   .0242858   .1558391 
     incomeR |       852        852  -.0588159   .0030794   .0554924 
       pid7R |       851        851  -.1186839   .4673355   .6836194 
    ideology |       851        851   .4377203   .0827343   .2876358 
     symrace |       866        866   .4951886   .0731785   .2705152 

             |    e(min)     e(max)     e(sum) 
-------------+---------------------------------
         age |        20         73       9729 
      female |         0          1        728 
     college |         0          1       1293 
     incomeR | -.1111111          0  -50.11111 
       pid7R |        -1          1       -101 
    ideology |         0          1      372.5 
     symrace |         0          1   428.8333 

. esttab using study1_summary.tex, cells("count mean sd min max") label noobs 
> replace 
(output written to study1_summary.tex)

. 
. 
. estpost summarize index indexApp2 indexChar  

             |  e(count)   e(sum_w)    e(mean)     e(Var)      e(sd) 
-------------+-------------------------------------------------------
       index |       889        889   .4679387   .0813988   .2853048 
   indexApp2 |       876        876   .4821918   .0399974   .1999936 
   indexChar |       876        876   .5305683   .0605672    .246104 

             |    e(min)     e(max)     e(sum) 
-------------+---------------------------------
       index |         0          1   415.9975 
   indexApp2 |         0          1      422.4 
   indexChar |         0          1   464.7778 

. esttab using study1_dvs.tex, cells("count mean sd min max") label noobs repl
> ace 
(output written to study1_dvs.tex)

. 
. 
. ***** Summary Stats of DVs by Party
. orth_out ageR female college incomeR pid7R ideology symrace using study1_bal
> ance.tex, by(treat) latex se pcompare count replace

                         White Neu~l:  White Der~r:  Black Neu~l:
                                   _             _             _
              Age:mean         0.287         0.326         0.320
                    se         0.033         0.036         0.039
           Female:mean         0.592         0.614         0.544
                    se         0.041         0.041         0.041
 College Educated:mean         0.964         0.955         0.944
                    se         0.016         0.018         0.019
    Family Income:mean        -0.054        -0.062        -0.064
                    se         0.005         0.005         0.005
            pid7R:mean        -0.088        -0.212        -0.130
                    se         0.061         0.056         0.058
         Ideology:mean         0.436         0.396         0.429
                    se         0.025         0.023         0.023
Racial Resentment:mean         0.488         0.442         0.510
                    se         0.023         0.023         0.023
                   N:_       147.000       141.000       150.000

                         Black Der~r:  (1) vs. (~e:  (1) vs. (~e:
                                   _             _             _
              Age:mean         0.275         0.435         0.523
                    se         0.026             .             .
           Female:mean         0.664         0.699         0.404
                    se         0.039             .             .
 College Educated:mean         0.940         0.703         0.418
                    se         0.021             .             .
    Family Income:mean        -0.053         0.275         0.141
                    se         0.005             .             .
            pid7R:mean        -0.170         0.136         0.614
                    se         0.057             .             .
         Ideology:mean         0.437         0.243         0.824
                    se         0.025             .             .
Racial Resentment:mean         0.511         0.164         0.505
                    se         0.022             .             .
                   N:_       149.000             .             .

                         (1) vs. (~e:  (2) vs. (~e:  (2) vs. (~e:
                                   _             _             _
              Age:mean         0.758         0.911         0.248
                    se             .             .             .
           Female:mean         0.198         0.226         0.376
                    se             .             .             .
 College Educated:mean         0.359         0.674         0.594
                    se             .             .             .
    Family Income:mean         0.819         0.700         0.183
                    se             .             .             .
            pid7R:mean         0.325         0.312         0.601
                    se             .             .             .
         Ideology:mean         0.978         0.327         0.239
                    se             .             .             .
Racial Resentment:mean         0.482         0.039         0.035
                    se             .             .             .
                   N:_             .             .             .

                         (3) vs. (~e:
                                   _
              Age:mean         0.325
                    se             .
           Female:mean         0.033
                    se             .
 College Educated:mean         0.905
                    se             .
    Family Income:mean         0.086
                    se             .
            pid7R:mean         0.624
                    se             .
         Ideology:mean         0.805
                    se             .
Racial Resentment:mean         0.975
                    se             .
                   N:_             .

. 
end of do-file

. 
. 
. *** Study 2 clean up.
. 
. cd ".."
C:\Users\Tabi\Dropbox\ingroup derogation and white response\Replication\Study1

. cd "..\Study2"
C:\Users\Tabi\Dropbox\ingroup derogation and white response\Replication\Study2

. do "study2_cleanup.do"

. *************************
. *****Data Management*****
. *************************
. 
. clear all

. set more off

. insheet using "study2_data.csv"
(37 vars, 1,212 obs)

.  
. *treatments
. tab fl_133_do

                          FL_133_DO |      Freq.     Percent        Cum.
------------------------------------+-----------------------------------
Nazitaexperiment-T1(neutral,Muslim) |        304       25.08       25.08
 Nazitaexperiment-T2(racist,Muslim) |        305       25.17       50.25
  NazitaexperimentT1(neutral,White) |        306       25.25       75.50
   NazitaexperimentT2(racist,White) |        297       24.50      100.00
------------------------------------+-----------------------------------
                              Total |      1,212      100.00

. gen treatment_string = .
(1,212 missing values generated)

. tostring treatment_string, replace
treatment_string was float now str1

. replace treatment_string = "Muslim neutral" if fl_133_do == "Nazitaexperimen
> t-T1(neutral,Muslim)"
variable treatment_string was str1 now str14
(304 real changes made)

. replace treatment_string = "Muslim racist" if fl_133_do == "Nazitaexperiment
> -T2(racist,Muslim)"
(305 real changes made)

. replace treatment_string = "White neutral" if fl_133_do == "Nazitaexperiment
> T1(neutral,White)"
(306 real changes made)

. replace treatment_string = "White racist" if fl_133_do == "NazitaexperimentT
> 2(racist,White)"
(297 real changes made)

. 
. gen treatment =.
(1,212 missing values generated)

. replace treatment = 3 if  treatment_string == "Muslim neutral"
(304 real changes made)

. replace treatment = 4 if  treatment_string == "Muslim racist"
(305 real changes made)

. replace treatment = 1 if  treatment_string == "White neutral"
(306 real changes made)

. replace treatment = 2 if  treatment_string == "White racist"
(297 real changes made)

. 
. 
. gen whitetreatment = .
(1,212 missing values generated)

. replace whitetreatment = 1 if treatment == 1
(306 real changes made)

. replace whitetreatment = 1 if treatment == 2
(297 real changes made)

. replace whitetreatment = 0 if treatment == 3
(304 real changes made)

. replace whitetreatment = 0 if treatment == 4
(305 real changes made)

. 
. gen neutraltreatment = .
(1,212 missing values generated)

. replace neutraltreatment = 1 if treatment == 1
(306 real changes made)

. replace neutraltreatment = 1 if treatment == 3
(304 real changes made)

. replace neutraltreatment = 0 if treatment == 2
(297 real changes made)

. replace neutraltreatment = 0 if treatment == 4
(305 real changes made)

. 
. 
. *DVs
.         *How strongly do you agree or disagree with the statement made by th
> is Senate candidate? (higher values = more resentment)
.         gen agree_sen = qid123

.         recode agree 8=0 9=.25 10=.5 11=.75 12=1
(agree_sen: 1212 changes made)

. 
.         
.         *If the election were held today, how likely would you be to vote fo
> r this Senate candidate? (higher values = more likely to vote)
.         gen vote = qid124

.         recode vote 18=1 19=.75 20=.5 21=.25 22=0
(vote: 1212 changes made)

.         
.         
.         * How would you rate the candidate on each of the following characte
> ristics? For each one, please indicate to what extent you agree or disagree 
> that the candidate has this attribute. (higher values = more agreemnt)
.                 *Truthful
.                 recode  qid125_1 8=1 9=2 10=3 11=4 12=5
(qid125_1: 1212 changes made)

.                 gen truthful = (qid125_1-1)/4

.                 
.                 *Bigoted 0-1
.                 tab qid125_2

   QID125_2 |      Freq.     Percent        Cum.
------------+-----------------------------------
          8 |        159       13.12       13.12
          9 |        191       15.76       28.88
         10 |        557       45.96       74.83
         11 |        191       15.76       90.59
         12 |        114        9.41      100.00
------------+-----------------------------------
      Total |      1,212      100.00

.                 gen bigoted = qid125_2

.                 recode bigoted 8=0 9=.25 10=.5 11=.75 12=1
(bigoted: 1212 changes made)

.                 
.                 *Unfair 
.                 gen unfair = qid125_3

.                 recode unfair 8=0 9=.25 10=.5 11=.75 12=1
(unfair: 1212 changes made)

. 
.                 *Honest 0-1
.                 gen honest = qid125_4

.                 recode honest 8=0 9=.25 10=.5 11=.75 12=1
(honest: 1212 changes made)

. 
.                 
. * Based on what you read in the article, is this politician a Democrat or a 
> Republican?
. tab qid127, gen(d)

     QID127 |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |        645       53.22       53.22
          2 |        567       46.78      100.00
------------+-----------------------------------
      Total |      1,212      100.00

. rename d1 cand_democrat

. rename d2 cand_republican       

. 
. 
.         
. *MAR Scale--this is asked post-treatment so we cannot use as moderator but c
> ould try as mediator.
. 
. *1. Most Muslim Americans integrate successfully into American culture.
. *QID50_1
. gen mar1 = 1+5-qid50_1

. 
. *2. Muslim Americans sometimes do not have the best interests of Americans a
> t heart.
. *QID50_2
. gen mar2 = qid50_2

. 
. *3. Muslims living in the US should be subject to more surveillance than oth
> ers.
. *QID50_3
. gen mar3 = qid50_3

. 
. *4. Muslim Americans, in general, tend to be more violent than other people
. *QID50_4 
. gen mar4 = qid50_4

. 
. *5. Most Muslim Americans reject jihad and violence.
. *QID50_6
. gen mar5 = 1+5-qid50_6

. 
. *6. Most Muslim Americans lack basic English language skills.
. *QID50_7
. gen mar6 = qid50_7

. 
. *7.  Most Muslim Americans are not terrorists.
. *QID50_8
. gen mar7 = 1+5-qid50_8

. 
. *8. Wearing headscarves should be banned in all public places.
. *QID50_9
. gen mar8 = qid50_9

. 
. *9. Muslim Americans do a good job of speaking out against Islamic terrorism
> .
. *QID50_10
. gen mar9 = 1+5-qid50_10

. 
. gen Postmar = (mar1+mar2+mar3+mar4+mar5+mar6+mar7+mar8+mar9)/9

. sum Postmar

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
     Postmar |      1,212    2.691327    .8225627          1          5

. replace Postmar = (Postmar-`r(min)') / (`r(max)'-`r(min)')
(1,212 real changes made)

. 
. 
. *Other covariates
. sum age, detail

                             age
-------------------------------------------------------------
      Percentiles      Smallest
 1%           18             18
 5%           21             18
10%           23             18       Obs               1,212
25%         31.5             18       Sum of Wgt.       1,212

50%           44                      Mean           45.56436
                        Largest       Std. Dev.      16.92081
75%           60             80
90%           69             80       Variance       286.3138
95%           72             81       Skewness       .1445679
99%           79             88       Kurtosis       1.826715

. 
. gen married =   qid20

. recode married 1=0 2=1
(married: 1212 changes made)

. 
. gen female = gender 

. recode female 1=0 2=1
(female: 1212 changes made)

. gen male = gender

. recode male 1=1 2=0
(male: 631 changes made)

. 
. gen income = qid17

. recode income 1=1 10=2 11=3 12=4 13=5 14=6
(income: 947 changes made)

. 
. gen income3 = qid17

. recode income3 1=0 10=.2 11=.4 12=.6 13=.8 14=1
(income3: 1212 changes made)

. 
. gen incomeR = (income-1)/5

. 
. gen educ = qid18

. gen educR = (educ-1)/5

. 
. gen college = 1 if educ>=5
(798 missing values generated)

. 
. gen pid7 = qid150

. recode pid7 0=1 4=1 5=2 6=3 7=4 8=5 9=6
(pid7: 975 changes made)

. gen pid7R = pid7/7

.  
. gen democrat = qid150

. recode democrat 1=1 4=1 5=1 6=0 7=0 8=0 9=0
(democrat: 975 changes made)

. gen republican = qid150

. recode republican 1=0 4=0 5=0 6=0 7=1 8=1 9=1
(republican: 1212 changes made)

. gen independent = qid150

. recode independent 1=0 4=0 5=0 6=1 7=0 8=0 9=0
(independent: 1212 changes made)

. 
. gen ideology_7pt = qid151  /*1-3 = liberal, 4 = middle of the road, 5-7 cons
> ervative*/

. recode ideology_7pt 8=1 10=2 11=3 12=4 13=5 14=6 15=7
(ideology_7pt: 1212 changes made)

. gen ideology_3pt =qid151/*-1 = liberal, 0 = middle of the road, 1 = conserva
> tive*/

. recode ideology_3pt 8=-1 10=-1 11=-1 12=0 13=1 14=1 15=1
(ideology_3pt: 1212 changes made)

. 
. gen ideoR = (ideology_7pt-1)/6

. 
. gen race = .
(1,212 missing values generated)

. tostring race, replace
race was float now str1

. replace race = "White" if qid14 == 1
variable race was str1 now str5
(873 real changes made)

. replace race = "Black" if qid14 == 2
(144 real changes made)

. replace race = "Hispanic" if qid14 == 3
variable race was str5 now str8
(82 real changes made)

. replace race = "Asian" if qid14 == 4
(59 real changes made)

. replace race = "Mixed Race" if qid14 == 5
variable race was str8 now str10
(25 real changes made)

. replace race = "Middle Eastern" if qid14 == 6
variable race was str10 now str14
(5 real changes made)

. replace race = "Native American" if qid14 == 7
variable race was str14 now str15
(12 real changes made)

. replace race = "Other Race" if qid14 == 8
(12 real changes made)

. 
. tab race, gen(d)

           race |      Freq.     Percent        Cum.
----------------+-----------------------------------
          Asian |         59        4.87        4.87
          Black |        144       11.88       16.75
       Hispanic |         82        6.77       23.51
 Middle Eastern |          5        0.41       23.93
     Mixed Race |         25        2.06       25.99
Native American |         12        0.99       26.98
     Other Race |         12        0.99       27.97
          White |        873       72.03      100.00
----------------+-----------------------------------
          Total |      1,212      100.00

. rename d1 asian

. rename d2 black

. rename d3 latino

. rename d8 white

. drop d4 d5 d6 d7

. gen otherrace = .
(1,212 missing values generated)

. replace otherrace = 1 if race =="Mixed Race"
(25 real changes made)

. replace otherrace = 1 if race =="Middle Eastern"
(5 real changes made)

. replace otherrace = 1 if race =="Native American"
(12 real changes made)

. replace otherrace = 1 if race =="Other Race"
(12 real changes made)

. replace otherrace = 0 if otherrace ==.
(1,158 real changes made)

. 
. gen ageR = (age-18)/70

. 
. 
. tab treatment_string, gen(d)

treatment_stri |
            ng |      Freq.     Percent        Cum.
---------------+-----------------------------------
Muslim neutral |        304       25.08       25.08
 Muslim racist |        305       25.17       50.25
 White neutral |        306       25.25       75.50
  White racist |        297       24.50      100.00
---------------+-----------------------------------
         Total |      1,212      100.00

. rename d1 muslimneutral

. rename d2 muslimracist

. rename d3 whiteneutral

. rename d4 whiteracist

. 
. alpha agree_sen vote honest truthful, item

Test scale = mean(unstandardized items)

                                                            average
                             item-test     item-rest       interitem
Item         |  Obs  Sign   correlation   correlation     covariance      alph
> a
-------------+----------------------------------------------------------------
> -
agree_sen    | 1212    +       0.8040        0.6290        .0440004      0.808
> 4
vote         | 1212    +       0.7679        0.5829        .0477991      0.826
> 8
honest       | 1212    +       0.8470        0.7199        .0418543      0.767
> 1
truthful     | 1212    +       0.8571        0.7371         .041048      0.759
> 5
-------------+----------------------------------------------------------------
> -
Test scale   |                                             .0436754      0.834
> 7
------------------------------------------------------------------------------
> -

. gen WM_index = (agree_sen + vote)/2

. gen WM_indexChar = (truthful + honest)/2

. gen WM_indexApp = ((1-bigoted) + (1-unfair))/2

. 
. drop if white == 0 
(339 observations deleted)

. saveold "study2_cleaned.dta", version(13) replace
(saving in Stata 13 format)
file study2_cleaned.dta saved

. 
. label var age "Age"

. label var ageR "Age"

. label var female "Female"

. label var college "College Educated"

. label var incomeR "Family Income"

. label var pid7R "Party ID"

. label var ideoR "Ideology"

. label var Postmar "MAR"

. label var treatment "Treatment"

. label var WM_index "Approval"

. label var WM_indexChar "Character"

. label var WM_indexApp "Appropriate"

. 
. label define treatment 1 "White Neutral" 2 "White Derogator" 3 "Muslim Neutr
> al" 4 "Muslim Derogator"

. label values treatment treatment

. 
. set matsize 2000

. cd ".\tables" 
C:\Users\Tabi\Dropbox\ingroup derogation and white response\Replication\Study2
> \tables

. 
. estpost summarize age female college incomeR ideoR pid7R Postmar 

             |  e(count)   e(sum_w)    e(mean)     e(Var)      e(sd) 
-------------+-------------------------------------------------------
         age |       873        873   48.80641   279.8191    16.7278 
      female |       873        873   .5063001    .250247   .5002469 
     college |       300        300          1          0          0 
     incomeR |       873        873   .3809851    .098583   .3139793 
       ideoR |       873        873   .5160367   .0923776   .3039368 
       pid7R |       873        873   .4498446   .0633459    .251686 
     Postmar |       873        873    .430476   .0456948   .2137634 

             |    e(min)     e(max)     e(sum) 
-------------+---------------------------------
         age |        18         88      42608 
      female |         0          1        442 
     college |         1          1        300 
     incomeR |         0          1      332.6 
       ideoR |         0          1      450.5 
       pid7R |  .1428571   .8571429   392.7143 
     Postmar |         0          1   375.8056 

. esttab using study2_summary.tex, cells("count mean sd min max") label noobs 
> replace
(output written to study2_summary.tex)

. 
. estpost summarize WM_index WM_indexApp WM_indexChar  

             |  e(count)   e(sum_w)    e(mean)     e(Var)      e(sd) 
-------------+-------------------------------------------------------
    WM_index |       873        873   .5193299   .0643657   .2537041 
 WM_indexApp |       873        873   .5390893   .0663638   .2576117 
WM_indexChar |       873        873    .567583   .0639838   .2529501 

             |    e(min)     e(max)     e(sum) 
-------------+---------------------------------
    WM_index |         0          1    453.375 
 WM_indexApp |         0          1    470.625 
WM_indexChar |         0          1      495.5 

. esttab using study2_dvs.tex, cells("count mean sd min max") label noobs repl
> ace 
(note: file study2_dvs.tex not found)
(output written to study2_dvs.tex)

. 
. 
. ***** Summary Stats of DVs by Party
. orth_out ageR female college incomeR ideoR pid7R Postmar using study2_balanc
> e.tex, by(treatment) latex se pcompare count replace

                        White Neu~l:  White Der~r:  Muslim Ne~l:  Muslim De~r:
                                  _             _             _             _
             Age:mean         0.450         0.442         0.427         0.441
                   se         0.015         0.017         0.016         0.017
          Female:mean         0.528         0.505         0.491         0.500
                   se         0.033         0.035         0.034         0.034
College Educated:mean         1.000         1.000         1.000         1.000
                   se         0.000         0.000         0.000         0.000
   Family Income:mean         0.384         0.350         0.393         0.397
                   se         0.022         0.021         0.021         0.021
        Ideology:mean         0.545         0.490         0.508         0.518
                   se         0.019         0.022         0.020         0.021
        Party ID:mean         0.479         0.416         0.443         0.458
                   se         0.016         0.017         0.017         0.017
             MAR:mean         0.434         0.410         0.422         0.455
                   se         0.014         0.015         0.015         0.014
                  N:_       231.000       210.000       218.000       214.000

                        (1) vs. (~e:  (1) vs. (~e:  (1) vs. (~e:  (2) vs. (~e:
                                  _             _             _             _
             Age:mean         0.713         0.284         0.694         0.516
                   se             .             .             .             .
          Female:mean         0.625         0.430         0.554         0.774
                   se             .             .             .             .
College Educated:mean             .             .             .             .
                   se             .             .             .             .
   Family Income:mean         0.259         0.765         0.652         0.150
                   se             .             .             .             .
        Ideology:mean         0.061         0.194         0.348         0.546
                   se             .             .             .             .
        Party ID:mean         0.008         0.128         0.371         0.272
                   se             .             .             .             .
             MAR:mean         0.250         0.546         0.282         0.583
                   se             .             .             .             .
                  N:_             .             .             .             .

                        (2) vs. (~e:  (3) vs. (~e:
                                  _             _
             Age:mean         0.979         0.537
                   se             .             .
          Female:mean         0.922         0.849
                   se             .             .
College Educated:mean             .             .
                   se             .             .
   Family Income:mean         0.107         0.880
                   se             .             .
        Ideology:mean         0.366         0.746
                   se             .             .
        Party ID:mean         0.088         0.544
                   se             .             .
             MAR:mean         0.030         0.098
                   se             .             .
                  N:_             .             .

. 
. 
. 
end of do-file

. 
. 
. *** Study 3 clean up.
. 
. cd ".."
C:\Users\Tabi\Dropbox\ingroup derogation and white response\Replication\Study2

. cd "..\Study3_4"
C:\Users\Tabi\Dropbox\ingroup derogation and white response\Replication\Study3
> _4

. do "study3_4_cleanup.do"

. clear 

. import delimited "study3_4_data.tsv", varnames(1)
Note:  354,610 binary zeros were ignored in the source file.  The first
       instance occurred on line 1.  Binary zeros are not valid in text
       data.  Inspect your data carefully.
(69 vars, 1,634 obs)

. 
. *** general dems
. 
. gen ageR = (age-18)/91
(66 missing values generated)

. gen incomeR = (income-1)/11
(835 missing values generated)

. 
. gen mixed = 1 if race != "2"
(1,481 missing values generated)

. replace mixed=0 if race =="2"
(1,481 real changes made)

. 
. gen female = 2-gender
(68 missing values generated)

. 
. gen college = 1 if education>=4
(460 missing values generated)

. replace college = 0 if education <4
(460 real changes made)

. 
. gen educationR = (education-1)/5
(835 missing values generated)

. 
. 
. *religion * 
. gen muslim = 1 if religion ==4
(1,595 missing values generated)

. replace muslim =0 if (religion <4 | religion >4)
(1,595 real changes made)

. 
. gen christian = 1 if religion <4
(488 missing values generated)

. replace christian =0 if religion >=4
(488 real changes made)

. 
. *Black identity * 
. gen linked_fateR = (4-linked_fate)/3
(734 missing values generated)

. 
. 
. * pid *
. gen pid7 = 1 if pid_d==1
(1,172 missing values generated)

. replace pid7 =2 if pid_d==2
(151 real changes made)

. replace pid7=3 if pid_i==1
(52 real changes made)

. replace pid7=4 if pid_i==3
(127 real changes made)

. replace pid7=5 if pid_i==2
(22 real changes made)

. replace pid7=6 if pid_r==2
(21 real changes made)

. replace pid7=7 if pid_r==1
(44 real changes made)

. 
. gen pidR = (pid7-1)/6
(755 missing values generated)

. 
. gen ideoR = (ideology-1)/4
(755 missing values generated)

. 
. 
. *MAR scale * 
. 
. gen muslim1 = (q21_1 - 1)/3
(721 missing values generated)

. gen muslim2 = (4-q21_2)/3
(721 missing values generated)

. gen muslim3 = (4-q21_3)/3
(721 missing values generated)

. gen muslim4 = (4-q21_4)/3
(721 missing values generated)

. gen muslim5 = (q21_5 - 1)/3
(721 missing values generated)

. gen muslim6 = (4-q21_6)/3
(721 missing values generated)

. gen muslim7 = (q21_7 - 1)/3
(721 missing values generated)

. 
. egen antimuslim7 = rowtotal(muslim1-muslim7)

. 
. gen antimuslim = antimuslim7/6

. 
. 
. *treatments study 1 *
. gen treat1 = .
(1,634 missing values generated)

. replace treat1 = 1 if wnb_aware != .
(220 real changes made)

. replace treat1 = 2 if wdb_aware != . 
(219 real changes made)

. replace treat1 = 3 if bnb_aware != .
(216 real changes made)

. replace treat1 = 4 if bdb_aware != . 
(215 real changes made)

. 
. 
. gen black1 = .
(1,634 missing values generated)

. replace black1 = 1 if treat1>2
(1,195 real changes made)

. replace black1 = 0 if treat1<=2
(439 real changes made)

. 
. gen white1 = .
(1,634 missing values generated)

. replace white1 = 1 if treat1<=2
(439 real changes made)

. replace white1 = 1 if treat1>2
(1,195 real changes made)

. 
. gen derog1 = .
(1,634 missing values generated)

. replace derog1 = 1 if (treat1 == 2 | treat1==4)
(434 real changes made)

. replace derog1 = 0 if (treat1 == 1 | treat1==3)
(436 real changes made)

. 
. gen neutral1 =.
(1,634 missing values generated)

. replace neutral1 = 1 if (treat1 == 1 | treat1==3)
(436 real changes made)

. replace neutral1 = 0 if (treat1 == 2 | treat1==4) 
(434 real changes made)

. 
. *treatments study 2 *
. gen treat2 = .
(1,634 missing values generated)

. replace treat2 = 1 if wnm_aware != .
(205 real changes made)

. replace treat2 = 2 if wdm_aware != . 
(201 real changes made)

. replace treat2 = 3 if mnm_aware != .
(205 real changes made)

. replace treat2 = 4 if mdm_aware != . 
(203 real changes made)

. 
. gen black2 = .
(1,634 missing values generated)

. replace black2 = 1 if treat2>2
(1,228 real changes made)

. replace black2 = 0 if treat2<=2
(406 real changes made)

. 
. gen white2 = .
(1,634 missing values generated)

. replace white2 = 1 if treat2<=2
(406 real changes made)

. replace white2 = 1 if treat2>2
(1,228 real changes made)

. 
. gen derog2 = .
(1,634 missing values generated)

. replace derog2 = 1 if (treat2 == 2 | treat2==4)
(404 real changes made)

. replace derog2 = 0 if (treat2 == 1 | treat2==3)
(410 real changes made)

. 
. gen neutral2 =.
(1,634 missing values generated)

. replace neutral2 = 1 if (treat2 == 1 | treat2==3)
(410 real changes made)

. replace neutral2 = 0 if (treat2 == 2 | treat2==4) 
(404 real changes made)

. 
. 
. 
. drop if treat1 == .
(764 observations deleted)

. 
. 
. * DVs * 
. 
. 
. gen B_aware = .
(870 missing values generated)

. replace B_aware = 1 if (wnb_aware==1|wdb_aware==1|bnb_aware==1|bdb_aware==1)
(89 real changes made)

. replace B_aware = .5 if (wnb_aware==3|wdb_aware==3|bnb_aware==3|bdb_aware==3
> )
(54 real changes made)

. replace B_aware = 0 if (wnb_aware==2|wdb_aware==2|bnb_aware==2|bdb_aware==2)
(727 real changes made)

. 
. gen B_agree1 = s1_agree
(4 missing values generated)

. replace B_agree1 = s1_agree-1 if s1_agree>3
(317 real changes made)

. gen B_agree = (4-B_agree)/3
(4 missing values generated)

. 
. gen B_appropriate = (4-s1_appropriate)/3
(25 missing values generated)

. 
. gen B_vote = (4-s1_vote)/3
(25 missing values generated)

. 
. gen B_honest = (5-s1_traits_1)/3
(27 missing values generated)

. gen B_bigoted = (5-s1_traits_2)/3
(27 missing values generated)

. gen B_unfair = (5-s1_traits_3)/3
(27 missing values generated)

. gen B_truthful = (5-s1_traits_4)/3
(27 missing values generated)

. gen B_trustworthy = (5-s1_traits_5)/3
(27 missing values generated)

. 
. alpha B_agree B_appropriate B_vote B_honest B_truthful B_trustworthy, i g(B_
> indexA)

Test scale = mean(unstandardized items)

                                                            average
                             item-test     item-rest       interitem
Item         |  Obs  Sign   correlation   correlation     covariance      alph
> a
-------------+----------------------------------------------------------------
> -
B_agree      |  866    +       0.8561        0.7919        .0911622      0.921
> 1
B_appropri~e |  845    +       0.8713        0.8101        .0875567      0.918
> 9
B_vote       |  845    +       0.8552        0.7881        .0889525      0.921
> 8
B_honest     |  843    +       0.8548        0.7848        .0879045      0.922
> 3
B_truthful   |  843    +       0.8723        0.8085        .0862703      0.919
> 2
B_trustwor~y |  843    +       0.8790        0.8202        .0866761      0.917
> 6
-------------+----------------------------------------------------------------
> -
Test scale   |                                             .0880868      0.932
> 6
------------------------------------------------------------------------------
> -

. factor B_agree B_appropriate B_vote B_honest B_truthful B_trustworthy
(obs=843)

Factor analysis/correlation                      Number of obs    =        843
    Method: principal factors                    Retained factors =          2
    Rotation: (unrotated)                        Number of params =         11

    --------------------------------------------------------------------------
         Factor  |   Eigenvalue   Difference        Proportion   Cumulative
    -------------+------------------------------------------------------------
        Factor1  |      4.19297      3.84817            0.9868       0.9868
        Factor2  |      0.34480      0.35462            0.0811       1.0680
        Factor3  |     -0.00982      0.07056           -0.0023       1.0657
        Factor4  |     -0.08038      0.01457           -0.0189       1.0467
        Factor5  |     -0.09495      0.00870           -0.0223       1.0244
        Factor6  |     -0.10365            .           -0.0244       1.0000
    --------------------------------------------------------------------------
    LR test: independent vs. saturated:  chi2(15) = 4273.59 Prob>chi2 = 0.0000

Factor loadings (pattern matrix) and unique variances

    -------------------------------------------------
        Variable |  Factor1   Factor2 |   Uniqueness 
    -------------+--------------------+--------------
         B_agree |   0.8322   -0.2688 |      0.2352  
    B_appropri~e |   0.8521   -0.2629 |      0.2048  
          B_vote |   0.8204   -0.1746 |      0.2965  
        B_honest |   0.8203    0.2726 |      0.2529  
      B_truthful |   0.8427    0.2624 |      0.2210  
    B_trustwor~y |   0.8475    0.1725 |      0.2519  
    -------------------------------------------------

. 
. alpha B_agree B_vote, i g(B_index)

Test scale = mean(unstandardized items)

Average interitem covariance:     .0855014
Number of items in the scale:            2
Scale reliability coefficient:      0.8502

. factor B_agree B_vote
(obs=845)

Factor analysis/correlation                      Number of obs    =        845
    Method: principal factors                    Retained factors =          1
    Rotation: (unrotated)                        Number of params =          1

    --------------------------------------------------------------------------
         Factor  |   Eigenvalue   Difference        Proportion   Cumulative
    -------------+------------------------------------------------------------
        Factor1  |      1.28239      1.47580            1.1776       1.1776
        Factor2  |     -0.19340            .           -0.1776       1.0000
    --------------------------------------------------------------------------
    LR test: independent vs. saturated:  chi2(1)  =  663.28 Prob>chi2 = 0.0000

Factor loadings (pattern matrix) and unique variances

    ---------------------------------------
        Variable |  Factor1 |   Uniqueness 
    -------------+----------+--------------
         B_agree |   0.8007 |      0.3588  
          B_vote |   0.8007 |      0.3588  
    ---------------------------------------

. 
. alpha B_appropriate B_unfair B_bigoted, i g(B_indexApp2)

Test scale = mean(unstandardized items)

                                                            average
                             item-test     item-rest       interitem
Item         |  Obs  Sign   correlation   correlation     covariance      alph
> a
-------------+----------------------------------------------------------------
> -
B_appropri~e |  845    -       0.7920        0.5809        .1105875      0.826
> 6
B_unfair     |  843    +       0.8887        0.7260        .0730387      0.681
> 3
B_bigoted    |  843    +       0.8751        0.6993        .0785338      0.710
> 6
-------------+----------------------------------------------------------------
> -
Test scale   |                                             .0873867      0.814
> 8
------------------------------------------------------------------------------
> -

. factor B_appropriate B_unfair B_bigoted
(obs=843)

Factor analysis/correlation                      Number of obs    =        843
    Method: principal factors                    Retained factors =          1
    Rotation: (unrotated)                        Number of params =          3

    --------------------------------------------------------------------------
         Factor  |   Eigenvalue   Difference        Proportion   Cumulative
    -------------+------------------------------------------------------------
        Factor1  |      1.66956      1.75967            1.1889       1.1889
        Factor2  |     -0.09011      0.08507           -0.0642       1.1247
        Factor3  |     -0.17518            .           -0.1247       1.0000
    --------------------------------------------------------------------------
    LR test: independent vs. saturated:  chi2(3)  =  925.53 Prob>chi2 = 0.0000

Factor loadings (pattern matrix) and unique variances

    ---------------------------------------
        Variable |  Factor1 |   Uniqueness 
    -------------+----------+--------------
    B_appropri~e |  -0.6402 |      0.5902  
        B_unfair |   0.8049 |      0.3521  
       B_bigoted |   0.7822 |      0.3882  
    ---------------------------------------

. gen B_indexApp = ((1-B_unfair) + (1-B_bigoted) + B_appropriate)/3
(27 missing values generated)

. 
. alpha B_honest B_truthful B_trustworthy, i g(B_indexChar)

Test scale = mean(unstandardized items)

                                                            average
                             item-test     item-rest       interitem
Item         |  Obs  Sign   correlation   correlation     covariance      alph
> a
-------------+----------------------------------------------------------------
> -
B_honest     |  843    +       0.9243        0.8280        .1035828      0.874
> 1
B_truthful   |  843    +       0.9326        0.8434         .099438      0.861
> 2
B_trustwor~y |  843    +       0.9133        0.8072        .1085297      0.891
> 2
-------------+----------------------------------------------------------------
> -
Test scale   |                                             .1038501      0.913
> 6
------------------------------------------------------------------------------
> -

. factor B_honest B_truthful B_trustworthy
(obs=843)

Factor analysis/correlation                      Number of obs    =        843
    Method: principal factors                    Retained factors =          1
    Rotation: (unrotated)                        Number of params =          3

    --------------------------------------------------------------------------
         Factor  |   Eigenvalue   Difference        Proportion   Cumulative
    -------------+------------------------------------------------------------
        Factor1  |      2.24379      2.32811            1.0918       1.0918
        Factor2  |     -0.08431      0.01997           -0.0410       1.0507
        Factor3  |     -0.10428            .           -0.0507       1.0000
    --------------------------------------------------------------------------
    LR test: independent vs. saturated:  chi2(3)  = 1762.91 Prob>chi2 = 0.0000

Factor loadings (pattern matrix) and unique variances

    ---------------------------------------
        Variable |  Factor1 |   Uniqueness 
    -------------+----------+--------------
        B_honest |   0.8675 |      0.2475  
      B_truthful |   0.8832 |      0.2199  
    B_trustwor~y |   0.8434 |      0.2888  
    ---------------------------------------

. 
. 
. gen B_perceivedDem = 2-s1_party
(37 missing values generated)

. 
. 
. 
. gen B_angry = s1_affect_1/100
(36 missing values generated)

. gen B_proud = s1_affect_2/100
(36 missing values generated)

. gen B_anxious = s1_affect_3/100
(36 missing values generated)

. gen B_hopeful = s1_affect_4/100
(36 missing values generated)

. 
. 
. * Muslim DVs  *
. 
. gen M_aware = .
(870 missing values generated)

. replace M_aware = 1 if (wnm_aware==1|wdm_aware==1|mnm_aware==1|mdm_aware==1)
(118 real changes made)

. replace M_aware = .5 if (wnm_aware==3|wdm_aware==3|mnm_aware==3|mdm_aware==3
> )
(33 real changes made)

. replace M_aware = 0 if (wnm_aware==2|wdm_aware==2|mnm_aware==2|mdm_aware==2)
(663 real changes made)

. 
. gen M_agree1 = s2_agree
(58 missing values generated)

. replace M_agree1 = s2_agree-1 if s2_agree>3
(273 real changes made)

. gen M_agree = (4-M_agree)/3
(58 missing values generated)

. 
. gen M_appropriate = (4-s2_appropriate)/3
(64 missing values generated)

. 
. gen M_vote = (4-s2_likely)/3
(64 missing values generated)

. 
. gen M_honest = (5-s2_traits_1)/3
(65 missing values generated)

. gen M_bigoted = (5-s2_traits_2)/3
(65 missing values generated)

. gen M_unfair = (5-s2_traits_3)/3
(65 missing values generated)

. gen M_truthful = (5-s2_traits_4)/3
(65 missing values generated)

. gen M_trustworthy = (5-s2_traits_5)/3
(65 missing values generated)

. 
. gen M_perceivedDem = 2-s2_party
(69 missing values generated)

. 
. 
. factor M_agree  M_appropriate M_vote M_honest M_truthful M_trustworthy
(obs=805)

Factor analysis/correlation                      Number of obs    =        805
    Method: principal factors                    Retained factors =          3
    Rotation: (unrotated)                        Number of params =         15

    --------------------------------------------------------------------------
         Factor  |   Eigenvalue   Difference        Proportion   Cumulative
    -------------+------------------------------------------------------------
        Factor1  |      4.63392      4.40878            0.9963       0.9963
        Factor2  |      0.22513      0.21375            0.0484       1.0447
        Factor3  |      0.01139      0.07463            0.0024       1.0472
        Factor4  |     -0.06324      0.01094           -0.0136       1.0336
        Factor5  |     -0.07419      0.00775           -0.0160       1.0176
        Factor6  |     -0.08194            .           -0.0176       1.0000
    --------------------------------------------------------------------------
    LR test: independent vs. saturated:  chi2(15) = 5104.25 Prob>chi2 = 0.0000

Factor loadings (pattern matrix) and unique variances

    -----------------------------------------------------------
        Variable |  Factor1   Factor2   Factor3 |   Uniqueness 
    -------------+------------------------------+--------------
         M_agree |   0.8866   -0.2350   -0.0212 |      0.1583  
    M_appropri~e |   0.8969   -0.2021   -0.0394 |      0.1531  
          M_vote |   0.8671   -0.1276    0.0645 |      0.2277  
        M_honest |   0.8752    0.2208   -0.0357 |      0.1840  
      M_truthful |   0.8823    0.2109   -0.0236 |      0.1765  
    M_trustwor~y |   0.8644    0.1398    0.0583 |      0.2299  
    -----------------------------------------------------------

. alpha M_agree  M_appropriate M_vote M_honest M_truthful M_trustworthy

Test scale = mean(unstandardized items)

Average interitem covariance:     .1121262
Number of items in the scale:            6
Scale reliability coefficient:      0.9529

. 
. factor M_agree M_vote
(obs=806)

Factor analysis/correlation                      Number of obs    =        806
    Method: principal factors                    Retained factors =          1
    Rotation: (unrotated)                        Number of params =          1

    --------------------------------------------------------------------------
         Factor  |   Eigenvalue   Difference        Proportion   Cumulative
    -------------+------------------------------------------------------------
        Factor1  |      1.46905      1.62225            1.1164       1.1164
        Factor2  |     -0.15320            .           -0.1164       1.0000
    --------------------------------------------------------------------------
    LR test: independent vs. saturated:  chi2(1)  =  863.01 Prob>chi2 = 0.0000

Factor loadings (pattern matrix) and unique variances

    ---------------------------------------
        Variable |  Factor1 |   Uniqueness 
    -------------+----------+--------------
         M_agree |   0.8570 |      0.2655  
          M_vote |   0.8570 |      0.2655  
    ---------------------------------------

. alpha M_agree M_vote, i g(M_index)

Test scale = mean(unstandardized items)

Average interitem covariance:      .112759
Number of items in the scale:            2
Scale reliability coefficient:      0.8964

. 
. factor M_unfair M_bigoted M_appropriate
(obs=805)

Factor analysis/correlation                      Number of obs    =        805
    Method: principal factors                    Retained factors =          1
    Rotation: (unrotated)                        Number of params =          3

    --------------------------------------------------------------------------
         Factor  |   Eigenvalue   Difference        Proportion   Cumulative
    -------------+------------------------------------------------------------
        Factor1  |      1.82045      1.90236            1.1501       1.1501
        Factor2  |     -0.08191      0.07372           -0.0517       1.0983
        Factor3  |     -0.15563            .           -0.0983       1.0000
    --------------------------------------------------------------------------
    LR test: independent vs. saturated:  chi2(3)  = 1064.26 Prob>chi2 = 0.0000

Factor loadings (pattern matrix) and unique variances

    ---------------------------------------
        Variable |  Factor1 |   Uniqueness 
    -------------+----------+--------------
        M_unfair |   0.8357 |      0.3016  
       M_bigoted |   0.8232 |      0.3224  
    M_appropri~e |  -0.6667 |      0.5555  
    ---------------------------------------

. alpha M_unfair M_bigoted M_appropriate, i g(M_indexApp2)

Test scale = mean(unstandardized items)

                                                            average
                             item-test     item-rest       interitem
Item         |  Obs  Sign   correlation   correlation     covariance      alph
> a
-------------+----------------------------------------------------------------
> -
M_unfair     |  805    +       0.9019        0.7621        .0906793      0.722
> 7
M_bigoted    |  805    +       0.8944        0.7468        .0941754      0.738
> 6
M_appropri~e |  806    -       0.8138        0.6172        .1312077      0.860
> 4
-------------+----------------------------------------------------------------
> -
Test scale   |                                             .1053541      0.841
> 3
------------------------------------------------------------------------------
> -

. gen M_indexApp = ((1-M_unfair) + (1-M_bigoted) + M_appropriate)/3
(65 missing values generated)

. 
. factor M_honest M_truthful M_trustworthy
(obs=805)

Factor analysis/correlation                      Number of obs    =        805
    Method: principal factors                    Retained factors =          1
    Rotation: (unrotated)                        Number of params =          3

    --------------------------------------------------------------------------
         Factor  |   Eigenvalue   Difference        Proportion   Cumulative
    -------------+------------------------------------------------------------
        Factor1  |      2.37513      2.44293            1.0699       1.0699
        Factor2  |     -0.06780      0.01960           -0.0305       1.0394
        Factor3  |     -0.08740            .           -0.0394       1.0000
    --------------------------------------------------------------------------
    LR test: independent vs. saturated:  chi2(3)  = 1981.40 Prob>chi2 = 0.0000

Factor loadings (pattern matrix) and unique variances

    ---------------------------------------
        Variable |  Factor1 |   Uniqueness 
    -------------+----------+--------------
        M_honest |   0.9038 |      0.1832  
      M_truthful |   0.9071 |      0.1772  
    M_trustwor~y |   0.8576 |      0.2645  
    ---------------------------------------

. alpha M_honest M_truthful M_trustworthy, i g(M_indexChar)

Test scale = mean(unstandardized items)

                                                            average
                             item-test     item-rest       interitem
Item         |  Obs  Sign   correlation   correlation     covariance      alph
> a
-------------+----------------------------------------------------------------
> -
M_honest     |  805    +       0.9431        0.8697        .1187372      0.889
> 1
M_truthful   |  805    +       0.9454        0.8729        .1164876      0.886
> 5
M_trustwor~y |  805    +       0.9223        0.8298        .1300289      0.920
> 6
-------------+----------------------------------------------------------------
> -
Test scale   |                                             .1217513      0.930
> 5
------------------------------------------------------------------------------
> -

. 
. 
. label var age "Age"

. label var ageR "Age"

. label var female "Female"

. label var college "College Educated"

. label var incomeR "Family Income"

. label var pidR "Party ID"

. label var ideology "Ideology"

. label var linked_fateR "Linked Fate"

. label var antimuslim "MAR"

. label var treat1 "Treatment"

. label var treat2 "Treatment"

. 
. label var B_index "Approval"

. label var B_indexApp "Appropriate"

. label var B_indexChar "Character"

. label var M_index "Approval"

. label var M_indexApp "Appropriate"

. label var M_indexChar "Character"

. 
. label define treat1 1 "White Neutral" 2 "White Derogator" 3 "Black Neutral" 
> 4 "Black Derogator"

. label values treat1 treat1

. 
. label define treat2 1 "White Neutral" 2 "White Derogator" 3 "Muslim Neutral"
>  4 "Muslim Derogator"

. label values treat2 treat2

. 
. save "study3_cleaned.dta", replace
file study3_cleaned.dta saved

. 
. set matsize 2000

. cd ".\tables" 
C:\Users\Tabi\Dropbox\ingroup derogation and white response\Replication\Study3
> _4\tables

. 
. estpost summarize age female incomeR college ideoR pidR linked_fateR

             |  e(count)   e(sum_w)    e(mean)     e(Var)      e(sd) 
-------------+-------------------------------------------------------
         age |       870        870   43.21724   256.5017   16.01567 
      female |       870        870   .5643678   .2461397   .4961247 
     incomeR |       799        799   .4279213   .0880038   .2966543 
     college |       870        870   .4712644    .249461   .4994607 
       ideoR |       870        870    .404023   .0743509   .2726736 
        pidR |       870        870   .2063218   .0818229   .2860471 
linked_fateR |       866        866   .6073903   .1123461   .3351807 

             |    e(min)     e(max)     e(sum) 
-------------+---------------------------------
         age |        18         99      37599 
      female |         0          1        491 
     incomeR |         0          1   341.9091 
     college |         0          1        410 
       ideoR |         0          1      351.5 
        pidR |         0          1      179.5 
linked_fateR |         0          1        526 

. esttab using study3_summary.tex, cells("count mean sd min max") label noobs 
> replace 
(note: file study3_summary.tex not found)
(output written to study3_summary.tex)

. 
. 
. estpost summarize B_index B_indexApp B_indexChar

             |  e(count)   e(sum_w)    e(mean)     e(Var)      e(sd) 
-------------+-------------------------------------------------------
     B_index |       866        866   .5144342   .1000804   .3163549 
  B_indexApp |       843        843   .5887703   .1072794   .3275353 
 B_indexChar |       843        843   .5095558   .1136699   .3371497 

             |    e(min)     e(max)     e(sum) 
-------------+---------------------------------
     B_index |         0          1      445.5 
  B_indexApp |         0          1   496.3333 
 B_indexChar |         0          1   429.5556 

. esttab using study3_dvs.tex, cells("count mean sd min max") label noobs repl
> ace 
(output written to study3_dvs.tex)

. 
. ***** Summary Stats of DVs by Party
. orth_out ageR female incomeR college ideoR pidR using study3_balance.tex, by
> (treat1) latex se pcompare count replace

                        White Neu~l:  White Der~r:  Black Neu~l:  Black Der~r:
                                  _             _             _             _
             Age:mean         0.290         0.287         0.272         0.260
                   se         0.012         0.012         0.012         0.012
          Female:mean         0.627         0.575         0.542         0.512
                   se         0.033         0.033         0.034         0.034
   Family Income:mean         0.425         0.426         0.432         0.429
                   se         0.021         0.020         0.021         0.022
College Educated:mean         0.482         0.489         0.463         0.451
                   se         0.034         0.034         0.034         0.034
           ideoR:mean         0.424         0.398         0.380         0.414
                   se         0.018         0.019         0.018         0.019
        Party ID:mean         0.205         0.201         0.189         0.231
                   se         0.019         0.019         0.018         0.020
                  N:_       220.000       219.000       216.000       215.000

                        (1) vs. (~e:  (1) vs. (~e:  (1) vs. (~e:  (2) vs. (~e:
                                  _             _             _             _
             Age:mean         0.858         0.299         0.076         0.375
                   se             .             .             .             .
          Female:mean         0.268         0.070         0.015         0.481
                   se             .             .             .             .
   Family Income:mean         0.971         0.822         0.891         0.847
                   se             .             .             .             .
College Educated:mean         0.888         0.694         0.523         0.594
                   se             .             .             .             .
           ideoR:mean         0.329         0.086         0.707         0.470
                   se             .             .             .             .
        Party ID:mean         0.895         0.564         0.347         0.658
                   se             .             .             .             .
                  N:_             .             .             .             .

                        (2) vs. (~e:  (3) vs. (~e:
                                  _             _
             Age:mean         0.100         0.474
                   se             .             .
          Female:mean         0.184         0.533
                   se             .             .
   Family Income:mean         0.917         0.933
                   se             .             .
College Educated:mean         0.436         0.806
                   se             .             .
           ideoR:mean         0.559         0.191
                   se             .             .
        Party ID:mean         0.283         0.126
                   se             .             .
                  N:_             .             .

. 
. 
. cd ".."
C:\Users\Tabi\Dropbox\ingroup derogation and white response\Replication\Study3
> _4

. 
. 
. drop if treat2==.
(56 observations deleted)

. save "study4_cleaned.dta", replace
file study4_cleaned.dta saved

. 
. 
. clear

. import delimited "study3_coder1.txt", case(preserve) 
(20 vars, 1,653 obs)

. rename ResponseId responseid

. sort responseid 

. 
. rename S1_code1 S1_code1_1

. rename S1_code2 S1_code2_1

. rename S1_code3 S1_code3_1

. rename S1_code4 S1_code4_1

. rename S1_code5 S1_code5_1

. rename S1_code6 S1_code6_1

. 
. 
. save "study3_coder1.dta", replace
file study3_coder1.dta saved

. 
. clear

. import delimited "study3_coder2.txt", case(preserve) 
(16 vars, 870 obs)

. sort responseid 

. 
. drop v12-v16

. 
. rename S1_code1 S1_code1_2

. rename S1_code2 S1_code2_2

. rename S1_code3 S1_code3_2

. rename S1_code4 S1_code4_2

. rename S1_code5 S1_code5_2

. rename S1_code6 S1_code6_2

. rename S1_Nonsense S1_code_Nonsense_2

. rename S1_Notes S1_Notes_2

. 
. save "study3_coder2.dta", replace
file study3_coder2.dta saved

. clear

. 
. use "study3_cleaned.dta"

. sort responseid

. merge 1:m responseid using "study3_coder1.dta"

    Result                           # of obs.
    -----------------------------------------
    not matched                           783
        from master                         0  (_merge==1)
        from using                        783  (_merge==2)

    matched                               870  (_merge==3)
    -----------------------------------------

. 
. drop if _merge==2
(783 observations deleted)

. drop _merge

. 
. merge 1:1 responseid using "study3_coder2.dta"

    Result                           # of obs.
    -----------------------------------------
    not matched                             0
    matched                               870  (_merge==3)
    -----------------------------------------

. 
. 
. gen code1 = (S1_code1_1 + S1_code1_2)/2
(45 missing values generated)

. gen code2 = (S1_code2_1 + S1_code2_2)/2
(44 missing values generated)

. gen code3 = (S1_code3_1 + S1_code3_2)/2
(44 missing values generated)

. gen code4 = (S1_code4_1 + S1_code4_2)/2
(44 missing values generated)

. gen code5 = (S1_code5_1 + S1_code5_2)/2
(44 missing values generated)

. gen code6 = (S1_code6_1 + S1_code6_2)/2
(44 missing values generated)

. 
. save "study3_cleaned_coded.dta", replace
file study3_cleaned_coded.dta saved

. 
. 
. 
. clear

. import delimited "study4_coder1.txt", case(preserve) 
(19 vars, 1,653 obs)

. rename ResponseId responseid

. sort responseid 

. 
. rename S2_code1 S2_code1_1

. rename S2_code2 S2_code2_1

. rename S2_code3 S2_code3_1

. rename S2_code4 S2_code4_1

. rename S2_code5 S2_code5_1

. rename S2_code6 S2_code6_1

. 
. 
. save "study4_coder1.dta", replace
file study4_coder1.dta saved

. 
. clear

. import delimited "study4_coder2.txt", case(preserve) 
(11 vars, 870 obs)

. sort responseid 

. 
. rename S2_code1 S2_code1_2

. rename S2_code2 S2_code2_2

. rename S2_code3 S2_code3_2

. rename S2_code4 S2_code4_2

. rename S2_code5 S2_code5_2

. rename S2_code6 S2_code6_2

. rename S2_Nonsense S2_code_Nonsense_2

. rename S2_Notes S2_Notes_2

. 
. save "study4_coder2.dta", replace
file study4_coder2.dta saved

. clear

. 
. use "study4_cleaned.dta"

. sort responseid

. merge 1:m responseid using "study4_coder1.dta"

    Result                           # of obs.
    -----------------------------------------
    not matched                           839
        from master                         0  (_merge==1)
        from using                        839  (_merge==2)

    matched                               814  (_merge==3)
    -----------------------------------------

. 
. drop if _merge==2
(839 observations deleted)

. drop _merge

. 
. merge 1:1 responseid using "study4_coder2.dta"

    Result                           # of obs.
    -----------------------------------------
    not matched                            56
        from master                         0  (_merge==1)
        from using                         56  (_merge==2)

    matched                               814  (_merge==3)
    -----------------------------------------

. 
. 
. gen code1 = (S2_code1_1 + S2_code1_2)/2
(85 missing values generated)

. gen code2 = (S2_code2_1 + S2_code2_2)/2
(85 missing values generated)

. gen code3 = (S2_code3_1 + S2_code3_2)/2
(85 missing values generated)

. gen code4 = (S2_code4_1 + S2_code4_2)/2
(86 missing values generated)

. gen code5 = (S2_code5_1 + S2_code5_2)/2
(86 missing values generated)

. gen code6 = (S2_code6_1 + S2_code6_2)/2
(85 missing values generated)

. 
. save "study4_cleaned_coded.dta", replace
file study4_cleaned_coded.dta saved

. 
. reg M_index i.treat2##c.code6

      Source |       SS           df       MS      Number of obs   =       785
-------------+----------------------------------   F(7, 777)       =     62.25
       Model |  35.8089629         7  5.11556613   Prob > F        =    0.0000
    Residual |   63.850842       777  .082176116   R-squared       =    0.3593
-------------+----------------------------------   Adj R-squared   =    0.3535
       Total |  99.6598049       784  .127117098   Root MSE        =    .28666

------------------------------------------------------------------------------
     M_index |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
      treat2 |
White Der..  |   -.341106   .0351341    -9.71   0.000     -.410075   -.2721371
Muslim Ne..  |   .0137498   .0360609     0.38   0.703    -.0570386    .0845381
Muslim De..  |  -.1666911   .0342933    -4.86   0.000    -.2340096   -.0993726
             |
       code6 |   .1480725    .046721     3.17   0.002     .0563581    .2397869
             |
      treat2#|
     c.code6 |
White Der..  |  -.5608451   .0961309    -5.83   0.000    -.7495521    -.372138
Muslim Ne..  |   .0101815   .0656945     0.15   0.877    -.1187782    .1391413
Muslim De..  |   -.658451   .1100738    -5.98   0.000    -.8745282   -.4423738
             |
       _cons |   .6837851   .0254806    26.84   0.000     .6337662    .7338041
------------------------------------------------------------------------------

. 
. label var code6 "Group Empathy"

. 
. sort responseid

. 
. insheet using "study4_v2_coder1.csv", clear
(12 vars, 870 obs)

. sort responseid 

. save "study4_v2_coder1.dta", replace
file study4_v2_coder1.dta saved

. 
. insheet using "study4_v2_coder2.csv", clear
(12 vars, 870 obs)

. sort responseid 

. save "study4_v2_coder2.dta", replace
file study4_v2_coder2.dta saved

. 
. use "study4_cleaned.dta", clear

. sort responseid

. merge 1:m responseid using "study4_v2_coder1.dta"

    Result                           # of obs.
    -----------------------------------------
    not matched                            56
        from master                         0  (_merge==1)
        from using                         56  (_merge==2)

    matched                               814  (_merge==3)
    -----------------------------------------

. drop _merge

. merge 1:m responseid using "study4_v2_coder2.dta"

    Result                           # of obs.
    -----------------------------------------
    not matched                             0
    matched                               870  (_merge==3)
    -----------------------------------------

. save "study4_data_coded_v2.dta", replace
file study4_data_coded_v2.dta saved

. 
. 
. cd ".\tables" 
C:\Users\Tabi\Dropbox\ingroup derogation and white response\Replication\Study3
> _4\tables

. 
. estpost summarize age female incomeR college ideoR pidR linked_fateR

             |  e(count)   e(sum_w)    e(mean)     e(Var)      e(sd) 
-------------+-------------------------------------------------------
         age |       814        814         43   254.8216   15.96313 
      female |       814        814   .5577396   .2469695   .4969603 
     incomeR |       799        799   .4279213   .0880038   .2966543 
     college |       814        814   .4348894   .2460629   .4960473 
       ideoR |       814        814   .4004914   .0751105   .2740629 
        pidR |       814        814   .2055692   .0832872   .2885953 
linked_fateR |       810        810   .6115226   .1109507   .3330926 

             |    e(min)     e(max)     e(sum) 
-------------+---------------------------------
         age |        18         99      35002 
      female |         0          1        454 
     incomeR |         0          1   341.9091 
     college |         0          1        354 
       ideoR |         0          1        326 
        pidR |         0          1   167.3333 
linked_fateR |         0          1   495.3333 

. esttab using study4_summary.tex, cells("count mean sd min max") label noobs 
> replace 
(note: file study4_summary.tex not found)
(output written to study4_summary.tex)

. 
. estpost summarize M_index M_indexApp M_indexChar

             |  e(count)   e(sum_w)    e(mean)     e(Var)      e(sd) 
-------------+-------------------------------------------------------
     M_index |       812        812   .5541872   .1255024   .3542632 
  M_indexApp |       805        805   .6191857   .1251919   .3538247 
 M_indexChar |       805        805   .5428572   .1308502   .3617322 

             |    e(min)     e(max)     e(sum) 
-------------+---------------------------------
     M_index |         0          1        450 
  M_indexApp |         0          1   498.4444 
 M_indexChar |         0          1        437 

. esttab using study4_dvs.tex, cells("count mean sd min max") label noobs repl
> ace 
(output written to study4_dvs.tex)

. 
. 
. ***** Summary Stats of DVs by Party
. orth_out ageR female incomeR college ideoR pidR using study4_balance.tex, by
> (treat2) latex se pcompare count replace

                        White Neu~l:  White Der~r:  Muslim Ne~l:  Muslim De~r:
                                  _             _             _             _
             Age:mean         0.259         0.280         0.280         0.280
                   se         0.012         0.013         0.012         0.013
          Female:mean         0.507         0.567         0.576         0.581
                   se         0.035         0.035         0.035         0.035
   Family Income:mean         0.431         0.427         0.425         0.429
                   se         0.021         0.022         0.021         0.021
College Educated:mean         0.434         0.428         0.444         0.433
                   se         0.035         0.035         0.035         0.035
           ideoR:mean         0.409         0.404         0.396         0.393
                   se         0.020         0.019         0.019         0.019
        Party ID:mean         0.233         0.200         0.193         0.196
                   se         0.021         0.020         0.020         0.019
                  N:_       205.000       201.000       205.000       203.000

                        (1) vs. (~e:  (1) vs. (~e:  (1) vs. (~e:  (2) vs. (~e:
                                  _             _             _             _
             Age:mean         0.228         0.214         0.238         0.992
                   se             .             .             .             .
          Female:mean         0.228         0.166         0.134         0.864
                   se             .             .             .             .
   Family Income:mean         0.907         0.843         0.969         0.938
                   se             .             .             .             .
College Educated:mean         0.899         0.843         0.989         0.745
                   se             .             .             .             .
           ideoR:mean         0.876         0.659         0.565         0.772
                   se             .             .             .             .
        Party ID:mean         0.254         0.163         0.194         0.803
                   se             .             .             .             .
                  N:_             .             .             .             .

                        (2) vs. (~e:  (3) vs. (~e:
                                  _             _
             Age:mean         0.983         0.975
                   se             .             .
          Female:mean         0.775         0.908
                   se             .             .
   Family Income:mean         0.936         0.872
                   se             .             .
College Educated:mean         0.909         0.833
                   se             .             .
           ideoR:mean         0.672         0.897
                   se             .             .
        Party ID:mean         0.898         0.899
                   se             .             .
                  N:_             .             .

. 
end of do-file

. 
. log close
      name:  <unnamed>
       log:  C:\Users\Tabi\Dropbox\ingroup derogation and white response\Repli
> cation\log.log
  log type:  text
 closed on:  28 Oct 2021, 05:12:31
------------------------------------------------------------------------------
